Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Ground Controller Lvl 1
Message 11 of 18

Re: How to run GitHub Actions Workflow only for new tags

Does the same apply to branches as well? Because this doesn't work for me:

 

 
on:
  push:
    branches:
      - '*'
 

 

Highlighted
Pilot Lvl 1
Message 12 of 18

Re: How to run GitHub Actions Workflow only for new tags

It does apply to branches, but if your branch might include / then you need to match on that too (for as many levels as you may have - */*, */*/*, */*/*/* etc.) e.g.:

 

on:
  push:
    branches:
      - '*'
- '*/*'

 

Copilot Lvl 2
Message 13 of 18

Re: How to run GitHub Actions Workflow only for new tags

@artalat Use two asterisks, that'll match sub-paths:

on:
  push:
    branches:
      - '**'

 

Pilot Lvl 1
Message 14 of 18

Re: How to run GitHub Actions Workflow only for new tags

The proposed solutuon doesnt seem to work for me.

:

on:
  push:
    tags:
    - '*'
Pilot Lvl 1
Message 15 of 18

Re: How to run GitHub Actions Workflow only for new tags

The proposed solution doesn't seem to work for me too :/ . 

Pilot Lvl 1
Message 16 of 18

Re: How to run GitHub Actions Workflow only for new tags

I am sorry. It is indeed working for me. Thank you 

Copilot Lvl 2
Message 17 of 18

Re: How to run GitHub Actions Workflow only for new tags

Hi @ethomson this solution appears to trigger when pushing to a new branch.

 

eg. `git push --set-upstream origin test` will cause it to trigger. Subsequent pushes will not cause it to trigger. Is this intended? 

 

UPDATE:

This problem appears to have be fixed on the GitHub side?

Copilot Lvl 2
Message 18 of 18

Re: How to run GitHub Actions Workflow only for new tags

where this needs to be updated.

 

I need to create trigger only when the tag is pushed/created in Github.any suggestion