How to run job if tag is v* #25911
-
How to run job if tag is versioned, for example v1.2.3? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
You can use an
|
Beta Was this translation helpful? Give feedback.
-
Thank you, This solution is for whole workflow. The question is how to make condition by tag for specific job of workflow. |
Beta Was this translation helpful? Give feedback.
-
Oh, right! In that case you could try to build an
That’s assuming the job will only be called for push events, otherwise you’d have to check the event type first. |
Beta Was this translation helpful? Give feedback.
-
It seems it is solution. Thank you! I’ve tested with There is missing documentation what the ref means https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#github-context |
Beta Was this translation helpful? Give feedback.
-
Yeah, that could use a link to something like the Git Internals - Git References chapter of the Git Book. Also if you want to know which |
Beta Was this translation helpful? Give feedback.
Oh, right! In that case you could try to build an
if
condition for the job that checksgithub.event.ref
, maybe something like this:That’s assuming the job will only be called for push events, otherwise you’d have to check the event type first.