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:
1 file changed
+17
-17
+17
-17
@@ -112,6 +112,16 @@ jobs:
|
|||||||
if [ "$count" -eq 0 ]; then echo "::warning title=Screenshots::$name --capture produced no images (exit $code)"; fi
|
if [ "$count" -eq 0 ]; then echo "::warning title=Screenshots::$name --capture produced no images (exit $code)"; fi
|
||||||
done
|
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)
|
- name: Publish desktop programs (win-x64, self-contained single file)
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
run: |
|
run: |
|
||||||
@@ -135,16 +145,6 @@ jobs:
|
|||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
retention-days: 7
|
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
|
- name: Upload Windows programs
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
@@ -163,15 +163,15 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v4
|
# Absent when the build broke before the capture step: nothing to publish then.
|
||||||
# Absent when the build broke before the capture step: nothing to publish then.
|
- uses: actions/cache/restore@v4
|
||||||
continue-on-error: true
|
|
||||||
with:
|
with:
|
||||||
name: screenshots
|
path: out/screenshots
|
||||||
path: screenshots
|
key: screenshots-${{ github.run_id }}-${{ github.run_attempt }}
|
||||||
|
enableCrossOsArchive: true
|
||||||
- name: Publish to the ci-screenshots branch (one commit, overwritten each run)
|
- name: Publish to the ci-screenshots branch (one commit, overwritten each run)
|
||||||
if: hashFiles('screenshots/*.png') != ''
|
if: hashFiles('out/screenshots/*.png') != ''
|
||||||
working-directory: screenshots
|
working-directory: out/screenshots
|
||||||
run: |
|
run: |
|
||||||
git init -q -b ci-screenshots
|
git init -q -b ci-screenshots
|
||||||
git config user.name "github-actions[bot]"
|
git config user.name "github-actions[bot]"
|
||||||
|
|||||||
Reference in new issue
Block a user