refactor: Update Dockerfile to use glibc-based images for frontend and backend builds, and implement a minimal distroless runtime for improved security and efficiency. Enhance CI workflow with cleanup of old Docker images.
Publish Fast Tabler Docker image / build-and-push-fast (push) Failing after 4m50s

This commit is contained in:
2025-08-08 08:47:59 +07:00
parent 4e5025b86e
commit a8c7d3e73e
2 changed files with 45 additions and 36 deletions
+26 -1
View File
@@ -50,4 +50,29 @@ jobs:
org.opencontainers.image.created=${{ gitea.event.head_commit.timestamp }}
build-args: |
BUILDKIT_INLINE_CACHE=1
provenance: false
provenance: false
- name: Cleanup old images
run: |
# Get list of all tabler-fast images, sorted by creation date (newest first)
IMAGES=$(curl -s -H "Authorization: Bearer ${{ secrets.ACTIONS_PAT }}" \
"https://git.shts.su/api/v1/repos/${{ gitea.repository }}/tags?page=1&limit=100" | \
jq -r '.[] | select(.name | startswith("tabler-fast-")) | .name' | \
sort -r)
# Keep only the 3 most recent images
KEEP_COUNT=3
COUNT=0
echo "$IMAGES" | while read -r tag; do
if [ -n "$tag" ]; then
COUNT=$((COUNT + 1))
if [ $COUNT -gt $KEEP_COUNT ]; then
echo "Deleting old image: $tag"
curl -X DELETE -H "Authorization: Bearer ${{ secrets.ACTIONS_PAT }}" \
"https://git.shts.su/api/v1/repos/${{ gitea.repository }}/tags/$tag"
else
echo "Keeping image: $tag"
fi
fi
done