feat(build,deploy)!: switch build→deploy handoff from artifacts to Actions cache - #21
Open
arnavchachra wants to merge 1 commit into
Open
feat(build,deploy)!: switch build→deploy handoff from artifacts to Actions cache#21arnavchachra wants to merge 1 commit into
arnavchachra wants to merge 1 commit into
Conversation
…ions cache build gains `output: cache`, which saves `build-output-path` under a caller- supplied `cache-key` via actions/cache/save. deploy gains `restore-cache`, which restores it via actions/cache/restore using an exact-key match and fails the deploy on a cache miss -- so an evicted or missing cache is a loud failure, never a silent empty deploy. Callers pass a run-unique `cache-key` (e.g. including github.run_id) to both sides. The artifact handoff is removed. This sidesteps the Actions artifact storage quota, whose exhaustion fails the build's upload step even when the build itself succeeds. BREAKING CHANGE: build no longer supports `output: artifact`, `artifact-name`, or `artifact-retention-days`, and deploy no longer supports `download-artifact` or `artifact-name`. Callers using the artifact handoff must switch to the cache handoff: set `output: cache` + `cache-key` on build, and `restore-cache: "true"` + a matching `cache-key` on deploy.
arnavchachra
force-pushed
the
feat/cache-build-handoff
branch
from
July 24, 2026 14:32
921a2e2 to
25f68fe
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The build → deploy handoff uploaded the build output as an Actions artifact. When a repo's artifact storage quota is exhausted,
upload-artifactfails withFailed to CreateArtifact: Artifact storage quota has been hit, failing the build even though the build itself succeeded. Quota is only recalculated every 6–12h, so the only recourse was retrying later.Solution
Replace the artifact handoff with the Actions cache:
build:output: cachesavesbuild-output-pathunder a caller-suppliedcache-key(viaactions/cache/save).deploy:restore-cache: "true"restores it (viaactions/cache/restore, exact-key match, norestore-keys), then a follow-up step fails the deploy oncache-hit != 'true'.Cache entries can be LRU-evicted or expire; the exact-key restore + fail-on-miss guard turns that into a loud, retryable pipeline failure rather than a silent empty/stale deploy. Callers pass a run-unique key (e.g.
build-${{ github.sha }}-${{ github.run_id }}) to both jobs so build/deploy agree and re-runs/concurrent runs don't collide.actions/cacheis pinned to v4.3.0. The Docker and Cloud Run paths are untouched.Breaking change
The artifact handoff is removed:
builddropsoutput: artifact,artifact-name,artifact-retention-days(outputis nowcache | none, defaultnone).deploydropsdownload-artifact,artifact-name.Ships as a new major. Consumers on the artifact handoff migrate by setting
output: cache+cache-keyon build andrestore-cache: "true"+ matchingcache-keyon deploy.Org-wide consumer audit (americangunowners, fajardo-trucking, logixa-hq, nurdsoft — all non-archived repos, default branches): only two live pipelines use the artifact handoff —
logixa-hq/frontend-web(pinned@v2) andfajardo-trucking/frontend-web(pinned@v3.1.0). Every other build/deploy consumer uses the Docker/Cloud Run path oroutput: none, and all consumers pin an older major, so none is affected until deliberately migrated to this major.Verify
output: cache+ matchingrestore-cache: deploy finds the build output and ships it.cache-key→ deploy fails at "Fail on build cache miss" (no empty deploy).