Filters tags doesn't work if only one job is defined in the workflow

When I use workflow with 2 defined jobs or more - tags working well. But if I define single-job workflows, this condition is ignored

Example:

workflows:
  version: 2
  main:
    jobs:
      - master:
          filters:
            branches:
              only: master
            tags:
              only: /.*/

I’m having trouble recreating your issue. I’ve created a complete config file here:

version: 2.1

jobs:
  master:
    docker:
      - image: cimg/base:2021.03
    steps:
      - run: echo sup

workflows:
  main:
    jobs:
      - master:
          filters:
            branches:
              only: master
            tags:
              only: /.*/

I pushed that config file up to the master branch. Which triggered a job because we always use the exiting config. Then I checked out a new branch called testing, committed a change, and pushed it up to GitHub. The testing branch did not trigger a job on CircleCI. That seems to be the expected behavior. Can you share more detailed steps of how to recreate the issue you’re encountering?

1 Like

Excuse me please, I have two repositories, and today I detect the disabled option “Only build PR” in the target repository, it’s not a bug
I’m sorry

1 Like

But in the future, I will look more attentive at configs if something wrong, thank you so much