Skip to content

fix: never run the settings workflow in a fork - #82

Merged
030 merged 1 commit into
mainfrom
fix-settings-skip-in-fork
Oct 12, 2026
Merged

030 merged 1 commit into
mainfrom
fix-settings-skip-in-fork

Conversation

@sbp-bvanb

Copy link
Copy Markdown
Collaborator

Summary

.github/workflows/settings.yml applies the settings of this repository with the action itself. In a fork, such as schubergphilis/settings-action, it would apply them to the fork on every push to main (including a fork sync), daily on the schedule and on a manual run, and fail where the fork lacks the SETTINGS_ACTION secret.

The settings-action job now has if: github.repository == '030/settings-action', so in a fork it is skipped. It does not check github.event.repository.fork: the payload of a schedule event has no repository, so that check would let the daily run through in a fork.

Testing

yamllint and actionlint pass. In this repository the job runs as before; the skip can only be observed in a fork after this is merged.

🤖 Generated with Claude Code

settings.yml applies this repository's own settings. In a fork it would
apply them to the fork on every push, every day on the schedule and on
a manual run. The job now runs only in 030/settings-action. It checks
github.repository rather than github.event.repository.fork, because a
schedule event has no repository in its payload.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@030
030 merged commit 16be2e9 into main Oct 12, 2026
8 checks passed
@030
030 deleted the fix-settings-skip-in-fork branch October 12, 2026 19:47
@030

030 commented Oct 12, 2026

Copy link
Copy Markdown
Owner

#80

@030 030 linked an issue Oct 12, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

if fork then do not run settings-actions workflow

2 participants