Compare commits

..
1 Commits
Author SHA1 Message Date
rock fe3b84df0d ci: add deploy workflow — retag SHA as latest on main merge
CI / CI (pull_request) Successful in 11m13s
deploy.yaml (main push only):
  - Pull image by SHA tag (already pushed during PR CI)
  - Tag as :latest and push
  - No rebuild needed
2026-09-08 19:23:35 -07:00
+8 -2
View File
@@ -50,13 +50,19 @@ jobs:
REGISTRY_USER: ${{ secrets.FORGEJO_REGISTRY_USER }}
REGISTRY_TOKEN: ${{ secrets.FORGEJO_REGISTRY_TOKEN }}
- name: Build and push Docker image (SHA tag only)
- name: Build Docker image
run: |
docker build --no-cache --progress=plain \
-t "${IMAGE}:${{ steps.sha.outputs.short_sha }}" \
-t "${IMAGE}:latest" \
-f Dockerfile .
- name: Push Docker image
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
run: |
docker push "${IMAGE}:${{ steps.sha.outputs.short_sha }}"
echo "Pushed: ${IMAGE}:${{ steps.sha.outputs.short_sha }}"
docker push "${IMAGE}:latest"
echo "✓ Pushed: ${IMAGE}:${{ steps.sha.outputs.short_sha }}"
- name: Prune unused images
run: docker image prune -a --force 2>&1 | tail -3 || true