fix: skip publish workflows on forks - #1626
Conversation
|
thanks for this pr lol 😄 i used to get a failed mail everytime syncing my fork ;-; never got around to it how about using the
and the event payload contains a repository object
so something like this should work |
No problem! Good idea, that's more robust. Just pushed the change! |
|
on a side note are you sure it was since that #1553 pr because that is a bit weird since I did not change the branch condition in that pr, it has been triggering for me quite a while publish one has been there for a while release workflow seems to be from this commit 3db9c2c ps: looks like static checks is failing because of missing newline at end of nix file due to the recently merged #1602 which was modified in an older pr but recently merged #1583 (running |



Change description
Fixes #1624. Pushes to
masteron forks trigger thePublishandReleaseworkflows, which fail without DockerHub/registry credentials and spam fork owners with failure emails on every upstream sync.This adds
if: ${{ !github.event.repository.fork }}to the single job indocker-build-and-push.ymlandrelease.yml, so they only run in the upstream repo. Both workflows only trigger onpushevents, whose payload always includes therepository.forkflag, and using the flag (rather than a hardcoded repo name) keeps the guard working even if the repo is ever renamed or moved.nix-environment.ymlis intentionally left unguarded: it needs no credentials and forks may want that build check.How to test: push any commit to
masteron a fork — the Publish and Release workflows should show as skipped instead of failing.AI coding assistance disclosure
I used Claude Code to identify the affected workflows and prepare the change. I reviewed the diff myself.
Contributor check list