Tag push not triggering action

Talking about: scaccogatto/contentful-module
I have this action (https://github.com/scaccogatto/contentful-module/blob/614dc86cfc5ff21c97bcad14582a22f8b12bdbba/.github/workflows/master.yml)
I have these tags (https://github.com/scaccogatto/contentful-module/tags)

But I see no triggers. What am I missing?

Adding branches might help:

on:
  push:
    branches:
      - '**'
    tags:
      - 'v*'
...

@scaccogatto,

You can try like as below to see if it can work:

on:
  push:
    tags:
      - 'v*'

OR

on:
  push:
    tags:
      - 'v**'

In addition, how did you push these tags to the repository? Manually executed the related git commands on your local machine to push tags, or executed the related git commands in a workflow to push tags?

If you used a workflow, what token did you use to authenticate? A personal access token (PAT) or the GITHUB_TOKEN?

If you used the GITHUB_TOKEN to push tags, it is the correct behavior that the workflow was not triggered. Because (see here):

When you use the repository’s GITHUB_TOKEN to perform tasks on behalf of the GitHub Actions app, events triggered by the GITHUB_TOKEN will not create a new workflow run. This prevents you from accidentally creating recursive workflow runs.

I am pushing with git push --follow-tags.
@Simran-B solved it! Thanks!

1 Like