Skip to content

On: workflow_run: does not work with release created #26548

Answered by mickeygousset
geirolz asked this question in Actions
Discussion options

You must be logged in to vote

OK, I was able to recreate it, and I know why it is happening.

This repo is where I was working on it: GitHub - mickeygoussetorg/deleteme

The problem is in your CD triggers, and in what is in the GitHub context object when you trigger off a created release vs when you just do a push.

If you just do a push, then the “ref” in the GitHub context object is refs/heads/main (or master, depending on what you use for your default branch). You can see that here.

However, when you trigger off a release, the ref is instead: refs/tags/releasetag. You can see that here.

Therefor, when the CD does its check, one thing you have it checking for is branch: master. Well, the CI wasn’t triggered from branch…

Replies: 16 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants