Sign only on a release tag push or an explicit dispatch - #78
Merged
Conversation
The sign job tested `startsWith(github.ref, 'refs/tags/')`, which is true for a workflow_dispatch launched from a tag ref as well as for a tag push. Dispatching the workflow from any tag therefore queued a signing run with `sign` left false. Test the event instead: a push whose ref is a tag (already filtered to the release patterns by `on.push.tags`), or a dispatch that asked for it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012gAp9x4L95B8DkeuHQpuqg Signed-off-by: Xavier Roche <roche@httrack.com>
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.
The sign job tested
startsWith(github.ref, 'refs/tags/') || inputs.sign. That first condition is true for aworkflow_dispatchlaunched from a tag ref, not only for a tag push, so dispatching the workflow from any tag queued a signing run, approval prompt included, withsignstill false. It now tests the event: a push whose ref is a tag, or a dispatch that asked to sign.This goes with two settings changed outside the repo tree: a tag ruleset restricting tag creation to the admin account, and a deployment branch policy on the
signingenvironment limiting it to master and the release tag patterns.