Git tags not working. It triggers the build despite what I define


I’m struggling my head to try to understand how git tags are working
And looking for all the comments related seems that I am not the only one. So something could be not well explained in the documentation.

I want to execute the build only when it matches some specific git tag.
Let’s say for example the config-test-circleci tag

So I do the following:

  • Being in my test branch I commit some changes

  • I create one tag with git tag config-test-circleci and push it with git push

  • I can see the tag there if I do one git tag

  • In my config.yaml I have the following config:

          - build_push_test:
                  only: /.*aefdefwefwefwfwefwefwefwf.*/

Obviously aefdefwefwefwfwefwefwefwf does not match with the config-test-circleci git tag. but it execute the build the same… Why???
What is failing here?.

If I configure my config.yaml with:

        - build_push_test:
                only: /^config-test.*/
                ignore: /.*/

It does not execute the build.

How can I execute the build in one branch when it match ONLY que it match some specific git tag?
Honestly I am totally confused about how this works.
Any help will be much appreciated.


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

Hi @gonzalomarcote,
CircleCI does not run workflows for tags unless you explicitly specify tag filters. However, if you push a fresh commit the workflow will run.

In order to trigger a workflow based on a tag, you can use tag filtering. If you have a look at your pipelines page, you will see a tag icon under the “branch/commit” heading. If the tag icon is present this indicates a tag was committed, which created a pipelines. This particular pipeline will not run unless you use tag filtering to execute workflows.

1 Like