From 3d225da40ee3c3fcda8377ad442e47b6ce0096c9 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 11 Oct 2026 23:34:08 +0000 Subject: [PATCH] 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 Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC --- .github/workflows/ci.yml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7ddee334..89163587 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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]"