ci: drop the build cache from tag image builds
ci / fork-checks (pull_request) Skipped
ci / build (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 7m28s

GitHub scopes a run's Actions cache to its ref, so the cache a tag build
wrote could only ever be read by that same tag: the next release built cold
anyway. Each release also parked several GB of Rust layers in the
repository's 10 GB cache, enough to evict main's cargo cache and slow
everyday builds too. The image builds now run without a cache.
This commit is contained in:
2026-09-30 06:44:41 -07:00
parent 6d7afc3c06
commit 031d028ba4
+4 -5
View File
@@ -236,17 +236,16 @@ jobs:
username: jcoffey-dev username: jcoffey-dev
password: ${{ secrets.GITEA_TOKEN }} password: ${{ secrets.GITEA_TOKEN }}
# Attestations off: they add manifests of their own, and the index # Attestations off: they add manifests of their own, and the index
# should hold the two images and nothing else. The GitHub Actions cache # should hold the two images and nothing else. No build cache: GitHub
# keeps the dependency layer (`cargo chef cook`), which only a # scopes a tag run's cache to that tag, so the next release could never
# dependency change alters, between releases. # read it, and each one would park several GB in the repository's 10 GB
# cache and evict main's cargo cache.
- uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0 - uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0
with: with:
context: . context: .
platforms: linux/${{ matrix.arch }} platforms: linux/${{ matrix.arch }}
provenance: false provenance: false
sbom: false sbom: false
cache-from: type=gha,scope=image-${{ matrix.arch }}
cache-to: type=gha,mode=max,scope=image-${{ matrix.arch }}
push: true push: true
tags: | tags: |
${{ env.IMAGE }}:${{ env.VERSION }}-${{ matrix.arch }} ${{ env.IMAGE }}:${{ env.VERSION }}-${{ matrix.arch }}