ci: screenshots reach their branch through the cache, not an artifact

While the artifact storage is full no artifact uploads, so the ci-screenshots
branch stopped updating. The build job now saves the screenshots to the Actions
cache, which has its own limit, and the screenshots job restores them from there;
the build job keeps its read-only token. The screenshots artifact is gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
Claude committed 2026-10-11 23:34:08 +00:00
1 parent 7cde9b583b
commit 3d225da40e
1 file changed
+17 -17
+17 -17
View File
@@ -112,6 +112,16 @@ jobs:
if [ "$count" -eq 0 ]; then echo "::warning title=Screenshots::$name --capture produced no images (exit $code)"; fi
done
# Handed to the screenshots job through the cache: it does not count against the artifact storage quota.
- name: Keep screenshots for the screenshots job
if: runner.os == 'Windows' && !cancelled() && hashFiles('out/screenshots/*.png') != ''
continue-on-error: true
uses: actions/cache/save@v4
with:
path: out/screenshots
key: screenshots-${{ github.run_id }}-${{ github.run_attempt }}
enableCrossOsArchive: true
- name: Publish desktop programs (win-x64, self-contained single file)
if: runner.os == 'Windows'
run: |
@@ -135,16 +145,6 @@ jobs:
if-no-files-found: ignore
retention-days: 7
- name: Upload screenshots
if: runner.os == 'Windows' && always()
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: screenshots
path: out/screenshots/
if-no-files-found: ignore
retention-days: 1 # read once by the screenshots job below; the ci-screenshots branch keeps the latest set
- name: Upload Windows programs
if: runner.os == 'Windows'
continue-on-error: true
@@ -163,15 +163,15 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
# Absent when the build broke before the capture step: nothing to publish then.
continue-on-error: true
# Absent when the build broke before the capture step: nothing to publish then.
- uses: actions/cache/restore@v4
with:
name: screenshots
path: screenshots
path: out/screenshots
key: screenshots-${{ github.run_id }}-${{ github.run_attempt }}
enableCrossOsArchive: true
- name: Publish to the ci-screenshots branch (one commit, overwritten each run)
if: hashFiles('screenshots/*.png') != ''
working-directory: screenshots
if: hashFiles('out/screenshots/*.png') != ''
working-directory: out/screenshots
run: |
git init -q -b ci-screenshots
git config user.name "github-actions[bot]"