-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unintentional workflow triggers #8
Comments
Note: I have since deleted tag |
This just bit me (because I haven't been following these issues)! Is it possible that pushing a non-compliant tag still triggers the workflow because it is considered a push to master? Rather than filtering which steps of the release job run using |
Pushes to master are supposed to trigger the workflow still, but just to skip the uploading to non-test PyPI and the main anaconda label. |
I understand that, my point was (which maybe you got anyway?) that Russ's unexpected behaviour listed in point 2 in his first post might be explained by the tag not matching (as expected), but the workflow still runs because it matches the other condition (if pushing a tag by itself is considered pushing to master) rather than the tag matching not working correctly. |
Right, I see. Not sure that's the case, but I think I understand what you're saying. |
The workflow in
.github/workflows/release.yml
begins:This was intended to trigger off either:
master
orstable
branchesv
.Evidently (and unintentionally), I think this workflow also triggers off:
1 Creation of any branch (implicit in above
create
block)?2. Creation of tags not beginning with
v
.Evidence for these are in the following workflow runs, respectively:
The first of these is unexpected but easy to fix, by:
github_properties
job, which filters out branch creation; andrelease
job dependent on this usingneeds: github_properties
.The second one is odd, and would seem to be a bug or incorrect usage of the tag filter.
Aside
The reason I'm including
create
events in this workflow is that they have nicer properties for unambiguously introspecting tags and versions from. Here's a table of examples for different events:github.ref
refs/heads/master
refs/tags/v0.1.0rc7
refs/heads/stable
refs/tags/v0.1.0rc7
github.event_name
push
push
create
create
github.event
Object
Object
Object
Object
github.event.name
github.event.ref
refs/heads/master
refs/tags/v0.1.0rc7
stable
v0.1.0rc8
github.event.ref_type
branch
tag
github.event.master_branch
master
master
master
master
github.actor
rpanderson
rpanderson
rpanderson
rpanderson
Note:
github.ref
andgithub.event.ref
are the same for push events, regardless of tag or branch pushes.github.event.ref_type
is unpopulated for push events.github.event.ref
ofgithub.event_name == create
andgithub.event.ref_type == tag
.The text was updated successfully, but these errors were encountered: