What can be wrong with this workflow? The 2nd stage is not triggered




I have built a workflow to trigger automated deploys on several tags. The problem is that it is not getting triggered when I push a tag matching the regular expression. The first stage is triggered just as planned. What can be an issue?

  version: 2
      - build
      - deploy:
            - build
              only: /^v?\d+.\d+.\d+(-(alpha|beta|rc)(.\d+)?)?$/
              ignore: /.*/


Would you give an example of a tag that should match but does not?


v0.2.1-alpha, for instance. Tested it on regex101.com, may be the problem was with the way I did it: tagged already pushed commit and then pushed the tag.


OK. I’d suggest removing the anchors and putting in a trivial regex, e.g. matching v, to see if that works, then build incrementally from there. Also, check the docs to see if you actually need the // delimiters.

Finally, is the tags filter more powerful than the branches filter? If not, then getting branches to ignore all would ignore would ignore everything, even if it matches a tag only filter.


I don’t think so. It was working when those stages were in two separate workflows.


Resolved by setting tags filter for build stage to /.*/


Great! There is a “solved” button in each answer, and you can click it to mark the answer as the solution.


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