Don't run on tag creation? #25615
-
It seems, that |
Beta Was this translation helpful? Give feedback.
Replies: 11 comments 1 reply
-
If you want to run on pushes but ignore all tags you’d need something like:
Workflow syntax for GitHub Actions - GitHub Docs
|
Beta Was this translation helpful? Give feedback.
-
Ty, I’ll try that. Seems to do, what I’m looking for. EDIT: Works well. |
Beta Was this translation helpful? Give feedback.
-
According to the introduction in the docs: If you do not want the push event is triggered when pushing/creating tags, you can only set branch filters (branches or branches-ignore) for the push event in your workflow.
OR
This configuration will cause the workflow to never be triggered. This is equivalent to disabling the workflow, and this workflow will become meaningless. If so, why don’t you directly delete the workflow file?
|
Beta Was this translation helpful? Give feedback.
-
Good to know. I’ll update the Workflow accordingly. |
Beta Was this translation helpful? Give feedback.
-
Fair enough: Any branch, ignore all tags.
Although confusingly and contrary to the bit @brightran quoted, https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet states:
Which to me implies that if you don’t specify branches then all branches are included… Right? If you don’t include a branch filter then you’re only specifying a tag filter or not specifying a filter at all. |
Beta Was this translation helpful? Give feedback.
-
This description includes 3 main situations below:
Situation 1 and 2 correspond to the description “Matches all branch and tag names”. |
Beta Was this translation helpful? Give feedback.
-
Okay, becoming clearer. Should the pattern in 1 and 2 be ‘!**’ (bang double asterisk)? Or, is the word ‘negative’ misplaced? (Or is there something else subtle I’m missing?) |
Beta Was this translation helpful? Give feedback.
-
Regarding situation 3, should the wording be slightly changed to make it clearer?
|
Beta Was this translation helpful? Give feedback.
-
Hey all, I looked through the replies, but not sure if the OP’s original query has been answered: preventing I’ve tried this, but it doesn’t seem to work:
|
Beta Was this translation helpful? Give feedback.
-
For me, this works:
|
Beta Was this translation helpful? Give feedback.
-
This works as expected: on:
push:
branches:
- "**"
tags:
- "!**" |
Beta Was this translation helpful? Give feedback.
If you want to run on pushes but ignore all tags you’d need something like:
docs.github.com
Workflow syntax for GitHub Actions - GitHub Docs