Skip to content

Commit 7449822

Browse files
ctruedenclaude
andcommitted
CI: do not run status workflow within forked repos
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 1e0c34c commit 7449822

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

.github/workflows/status.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,16 @@ concurrency:
2121
jobs:
2222
status:
2323
runs-on: ubuntu-latest
24-
# Scheduled runs always proceed. workflow_run runs only when the triggering
25-
# build was a push to master (i.e. one that republished smelt.json).
24+
# Restrict to the canonical repo, since scheduled (cron) triggers fire on
25+
# every fork's default branch too, regardless of push activity there.
26+
# Beyond that: scheduled runs always proceed, while workflow_run runs only
27+
# when the triggering build was a push to master (i.e. one that
28+
# republished smelt.json).
2629
if: >-
27-
github.event_name != 'workflow_run' ||
28-
(github.event.workflow_run.event == 'push' &&
29-
github.event.workflow_run.head_branch == 'master')
30+
github.repository == 'scijava/pom-scijava' &&
31+
(github.event_name != 'workflow_run' ||
32+
(github.event.workflow_run.event == 'push' &&
33+
github.event.workflow_run.head_branch == 'master'))
3034
permissions:
3135
actions: write # needed to delete and re-save caches
3236

0 commit comments

Comments
 (0)