Github actions workflow not triggering with tag push

I have a workflow with 2 actions. The first action is triggered when a push is made to the branch and pushes new git tag and the second action is triggered when after a new tag is pushed. However, the second action is not triggering lately even though the tags are being created and pushed into git tags by the first action. Anyone else facing the same issue?

I am using the tag based build as below: also used create event. Nothing seems to work

on:
  push:
    tags:
      - '*'
2 Likes

Do you have two workflows, one with an action to push new tags and the other be triggered by tag creation ? Which token do you use in the first action to create new tag?

There is a limitation of workflow: An action in a workflow run can’t trigger a new workflow run.

When you use GITHUB_TOKEN in your actions, all of the interactions with the repository are on behalf of the Github-actions bot. The operations act by Github-actions bot cannot trigger a new workflow run.

You can go to releases page to see the user who released a release.

I would suggest you use your own PAT when creating tags. You can store your PAT in secrets and use

${{ secrets.PATNAME } in your actions.

env:

   GITHUB_TOKEN: ${{ secrets. PATNAME }}

https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets

6 Likes

Thanks a ton! It worked…

Is there any possibility of this changing? Adding a PAT to every repo in our organisation is not a good option for two reasons:

* We would have to update every single repo anytime we need to roll the token.

* If we create a user specifically for this kind of task then we have to pay for an extra seat.

17 Likes