Push of feature branch to GitHub origin triggers "production" workflow, even though branch should be filtered

I’m stumped…

GitHub webhook for CircelCI has “Just the push event” checked

So when I push “AUT-xxxx” to origin, I’m happy to see that CircleCI is indeed getting the event.

However, “production” workflow should be filtering out any branches other than “production”,
since I’ve got an explicit “only:” filter on branches named “production”
And that filtering isn’t happening…

I’ve verified - I don’t have any githooks
I’ve reviewed How to debug config
I’ve run my config.yml through https://yaml-online-parser.appspot.com

workflows:
  version: 2
  sandbox:
    jobs:
    - deploy:
        filters:
          branches:
            only:
            - sandbox
  staging:
    jobs:
    - deploy:
        filters:
          branches:
            only:
            - staging
  production:
    jobs:
    - deploy:
        filters:
          branches:
            only:
            - production
        requires:
        - hold
    - hold:
        type: approval

I cannot explain why the push of AUT-xxx is triggering the “production” workflow.
And therefore, no clue as to how to stop that from happening.

I added the same branch filter to the “hold” job - and that did the trick

    - hold:
        type: approval
        filters:
          branches:
            only:
            - production

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