-
Notifications
You must be signed in to change notification settings - Fork 295
Clarification on triggering events after release #71
Comments
@smac89 do I get it right that release event won't trigger at all? After using create-release on the previous step name: Test event.release.tag_name
on:
push:
tags:
- "[0-9]+.[0-9]+"
jobs:
release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
- name: check tag
if: ${{ github.event.release.tag_name }} == ''
run: |
echo Epic fail
exit 1 |
@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 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 Moreover, in your current setup, this workflow will not be able to get the payload from the release event. Why? For two reasons:
*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. |
I see, I understand it better now:
Thank you very much! @smac89 |
Damn, I've spend a day trying to figure out why this (from another workflow) on:
release:
types:
- published
- created is not triggered by releases created with this action, but successfully triggered by "manual" releases! The docs definitely must note this… |
Closes actions#71 The purpose of this PR is to make an important note about user expectations with regards to the `release` event created by this action. The crux of it is that the release event created by this action will not trigger another workflow.
The readme has the following line:
I think there should be some clarification that a release event created with the default
github.token
(orsecrets.GITHUB_TOKEN
), will not trigger another workflow. The user will have to use a personal access token for this to work.The text was updated successfully, but these errors were encountered: