ci(workflow): remove post-job Docker prunes; keep pre-clean and reliable self-hosted fallback

- Keep pre-build cleanup on GH runners (free-disk-space action and Docker builder/system prune) to prevent ENOSPC during builds.
- Remove post-job prune steps for both GH and ephemeral self-hosted runners since runners are discarded after the job and setup-buildx uses cleanup=true to remove builders automatically.
- Retain fallback: self-hosted build runs only if the GH build fails; publish succeeds if either path succeeds; final job fails only if both builds fail.
This commit is contained in:
clsferguson 2025-09-30 14:55:38 -06:00 committed by GitHub
parent fba33ec275
commit ae49228b6e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -124,12 +124,6 @@ jobs:
${{ env.IMAGE_NAME }}:${{ needs.check-tag.outputs.current_tag }}
${{ env.IMAGE_NAME }}:latest
- name: Prune Docker caches (post)
if: always()
run: |
docker builder prune -af || true
docker system prune -af --volumes || true
build-self:
name: Build on Self-Hosted (fallback)
needs: [check-tag, build-gh]
@ -187,12 +181,6 @@ jobs:
${{ env.IMAGE_NAME }}:${{ needs.check-tag.outputs.current_tag }}
${{ env.IMAGE_NAME }}:latest
- name: Prune Docker caches (post)
if: always()
run: |
docker builder prune -af || true
docker system prune -af --volumes || true
publish:
name: Update Release
needs: [check-tag, build-gh, build-self]