ci: a cache export error should not fail the image publish (#1435)

Kept small on purpose so it's easy to review. Same kind of small fix as
#1429 to #1432, so see the question in #1429 about separate PRs versus
combined. I'm sending them separately until I hear otherwise.

`cache-to: type=gha` has no `ignore-error`, and the Docker docs list it
as defaulting to `false`. If the GitHub Actions cache service errors
while exporting, the build step fails after the image has been built and
pushed, so the attestation step is skipped. The docs suggest
`ignore-error=true` when cache export is optional, which it is here.

I haven't seen an export fail on this repo, so this is a precaution and
I can't reproduce it locally. It's a one-line change plus a comment.

The one red check is the existing clock-dependent test
`test_a_queued_torrent_asks_for_a_grace_once`, which fails on any runner
that booted recently. It is fixed in #1426 and is not caused by this
change.
This commit is contained in:
splitsec2 authored and GitHub committed 2026-10-20 01:01:56 -04:00
1 parent 61cf0792bd
commit b5e47b2593
1 file changed
+3 -2
@@ -78,9 +78,10 @@ jobs:
annotations: ${{ steps.meta.outputs.annotations }}
# Runners are ephemeral, so without this every layer is rebuilt on every
# run: the pinned Chromium install, the dependency syncs, the driver
# setup. Scoped per target so the two images do not evict each other.
# setup. Scoped per target so the two images do not evict each other. A cache
# export error (ignore-error defaults to false) should not fail a finished publish.
cache-from: type=gha,scope=${{ matrix.target }}
cache-to: type=gha,scope=${{ matrix.target }}
cache-to: type=gha,scope=${{ matrix.target }},ignore-error=true
- name: Generate artifact attestation for ${{ matrix.target }} image
if: github.event_name != 'pull_request'