I have read https://circleci.com/docs/configuration-reference#logic-statement-examples and I want to had a condition when the tag match a certain pattern to the logic statement:
<< pipeline.git.branch >>
is master
(current)
OR<< pipeline.git.tag >>
is of pattern /^(patch\/)?v.*/
or /^hotfix-.*/
This is our .circleci.yml
conditions prior any modifications: https://github.com/pass-culture/pass-culture-app-native/blob/master/.circleci/config.yml#L107-L115
This is what I have tried:
- when:
condition:
or:
- equal: ["master", << pipeline.git.branch >>]
- matches:
pattern: /^(patch\/)?v.*/
value: << pipeline.git.tag >>
Circle-CI does not run the commands when doing the following:
git tag patch/v1.199.99
git push origin patch/v1.199.99
Condition doesn't match when << pipeline.git.tag >>
is patch/v1.199.99
and thus doesn't run the pipeline, any clue what am I doing wrong here ?
This is how we did : https://github.com/pass-culture/pass-culture-app-native/pull/3604#issue-1383526470
We needed to update the workflows to trigger on tags. I don't know why though.