Skip to content

How to restrict execution of GitHub Actions workflow on tags creation only #24925

Answered by PilotConway
glambert asked this question in Actions
Discussion options

You must be logged in to vote

I was just running into this. I solved just using a full ref path: 

on:
  push:
    branches:
      - refs/tags/*

So I’m pretty sure you can then restrict to scopes like this: 

on:
  push:
    branches:
      - refs/tags/@orgname/*

I basically wanted to wildcard any tag push only, but this is the only way I could get it to work right.

Replies: 13 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@jeacott1
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD
10 participants