You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 4, 2021. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 4, 2021. It is now read-only.
Clarification on triggering events after release #71
This will create a Release, as well as a release event, which could be handled by a third party service, or by GitHub Actions for additional uses, for example the @actions/upload-release-asset GitHub Action.
I think there should be some clarification that a release event created with the default github.token (or secrets.GITHUB_TOKEN), will not trigger another workflow. The user will have to use a personal access token for this to work.
@smac89 do I get it right that release event won't trigger at all?
@murlakatamenka I'm not too sure I understand your question. Events trigger workflows, but actions can also do things that create events, which end up triggering workflows. For example, using this create-release action will run the action, which will create a release, and trigger the release event.
My point in posting that issue comment is to point out that after this action runs, the release event it creates will not trigger another workflow, if you used the default GITHUB_TOKEN secret for authentication (which you are using). You can see the link I referenced to read it for yourself.
Moreover, in your current setup, this workflow will not be able to get the payload from the release event. Why?
For two reasons:
*Since the event was triggered inside this workflow, it is not possible that you will see it within the same workflow that triggered the event.
Your workflow is not setup to be triggered when a release event occurs, i.e. your on section does not include release, only push.
*Actually I'm not too sure about the first reason, but I doubt workflows are able to see new events which occur after the workflow started. Don't quote me on that one, but you can test and see if it works.
My point in posting that issue comment is to point out that after this action runs, the release event it creates will not trigger another workflow, if you used the default GITHUB_TOKEN secret for authentication (which you are using).
Activity
murlakatamenka commentedon Sep 1, 2020
@smac89 do I get it right that release event won't trigger at all?
After using create-release on the previous step
${{ github.event.release.tag_name }}is empty when using on the following one.smac89 commentedon Sep 4, 2020
@murlakatamenka I'm not too sure I understand your question. Events trigger workflows, but actions can also do things that create events, which end up triggering workflows. For example, using this
create-releaseaction will run the action, which will create a release, and trigger the release event.My point in posting that issue comment is to point out that after this action runs, the release event it creates will not trigger another workflow, if you used the default
GITHUB_TOKENsecret for authentication (which you are using). You can see the link I referenced to read it for yourself.Moreover, in your current setup, this workflow will not be able to get the payload from the release event. Why?
For two reasons:
onsection does not includerelease, onlypush.*Actually I'm not too sure about the first reason, but I doubt workflows are able to see new events which occur after the workflow started. Don't quote me on that one, but you can test and see if it works.
murlakatamenka commentedon Sep 5, 2020
I see, I understand it better now:
Thank you very much! @smac89
madhead commentedon Jan 5, 2021
Damn, I've spend a day trying to figure out why this (from another workflow)
is not triggered by releases created with this action, but successfully triggered by "manual" releases!
The docs definitely must note this…
Documentation clarification on release event