Repository navigation
ci: explicitly dispatch build-rpm.yml instead of relying on push - #46
Merged
Merged
Conversation
Pushes made with the default GITHUB_TOKEN don't trigger other workflows (GitHub's anti-loop guard on Actions-authored events), so dispatch-packaging.yml's push to rpm never actually fired build-rpm.yml — the v4.6.0 release only got its RPM asset because it was pushed manually with a personal credential, twice. Add actions:write permission and an explicit `gh workflow run build-rpm.yml --ref rpm` step after the push. Companion fix: rpm's build-rpm.yml now declares a workflow_dispatch trigger so this dispatch is possible (pushed directly to rpm already).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Discovered while re-cutting the v4.6.0 release:
dispatch-packaging.ymlpushes the rebuiltrpmbranch using the defaultGITHUB_TOKEN. GitHub doesn't let events triggered byGITHUB_TOKENcascade into triggering other workflows (an anti-loop guard), sobuild-rpm.yml'spush: branches: [rpm]trigger never actually fired from that automated push. The only reason v4.6.0 got an RPM asset at all is that I pushed torpmmanually with my own credentials, twice, working around this.Fix: give the job
actions: write, and after pushing, explicitly callgh workflow run build-rpm.yml --ref rpm— an explicit API dispatch isn't subject to the same restriction. Companion change (already pushed directly torpm, not part of this PR):build-rpm.ymlnow also declares aworkflow_dispatchtrigger, which is required for it to be dispatchable this way.Test plan
build-rpm.ymlviagh workflow run --ref rpmafter adding itsworkflow_dispatchtrigger — succeeded, produced the v4.6.0 release asset