Skip to content

Commit d8daceb

Browse files
committed
build(ci): don't store screenshots on most PRs
Store only needs to be executed on `main` We run on some file changes, in case they break the upload process, but this is only defensive. Note: this does upload artifacts, this could be avoided, but the complexity makes the 'happy path' of this workflow harder to reason about. Issue 20942 Assisted-by: Claude Opus 4.7
1 parent f11d535 commit d8daceb

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/screenshot_store.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,15 @@ on:
2626
push:
2727
branches:
2828
- main
29+
# On PRs, only run this when structural changes occur, to be sure 'main' can still store baselines
2930
pull_request:
31+
paths:
32+
- '.github/workflows/screenshot_*.yml'
33+
- 'gradle/libs.versions.toml'
34+
- 'AnkiDroid/build.gradle'
35+
- 'AnkiDroid/build.gradle.kts' # future-proof
36+
- '**/ScreenshotTest.kt'
37+
- 'tools/compare-screenshot-test.sh'
3038

3139
permissions: {}
3240

0 commit comments

Comments
 (0)