Use of << pipeline.git.tag >> in workflows.$name.when

Following snippet doesn’t create pipeline, when I push tag, it still requires filters.tags specified on every job

workflows:
  version: 2
  deploy_uat:
    when:
      equal: [uat, << pipeline.git.tag >>]
    jobs:
      - build
      - deploy_uat
4 Likes

This is exactly what I am looking for.

I know that if I want to run multiple jobs in a workflow that is triggered by a tag, I need to set a filter for every job.

However, it is very inconvenient.

I would like to be able to omit redundant description only in the case of when in workflow.

prod-workflow:
    when:
        - matches: 
            pattern: "^v.*"
            value: << pipeline.git.tag >>

I’m trying something similar, and being similarly frustrated. I did find a snippet saying that circle does not run workflows on tags unless there is a tag filter associated on the jobs, which I assume is what is stopping me from making this work. I got rid of my when logic and placed the tag filter on every job inside the workflow and I got the desired behavior. But I really want to use the cleaner syntax of the when statement, I hope they support it soon.

This behavior isn’t what we would expect, we’re investigating and will report back.

1 Like

@salil having the same Issue! I wanted to use when but it does not work I am kind of forced to use filters.

Hi @salil , sorry for pinging but we’re also facing the same inconvenience. Do you have any updates on it?