CircleCI Ideas

add 'owner' filter to workflows (concept was in v1, but is missing from v2)

Reference stackoverflow post:


In the circleci version 1 config, there was the option to specify owner as an option in a deployment. An example from the circleci docs ( ) with owner: circleci being the key line:

    branch: master
    owner: circleci
      - ./

In version 2 of the config, there is the ability to use filters and tags to specify which branches are built, but I have yet to find (in the docs, or on the interwebs) anything that gives me the same capability.

What I'm trying to achieve is run build and test steps on forks, but only run the deploy steps if the repository owner is the main repo. Quite often people fork using the same branch name - in this case master - so having a build fail due to an inability to deploy is counter-intuitive, especially as I would like to use a protected branch in git and only merge commits based on a successful build in a pull request.

I realise we could move to only running builds based on tags being present, but nothing is stopping somebody with a fork also creating a tag in their fork, which puts us back at square one.

This capability of v1 configs is missing in v2 workflows.

Putting in a bunch of if statements in the workflow commands is messy, and while it will do as a workaround, it would be good to have the capability in the v2 config in a cleaner/easier to understand way.

An example from the version 2 config document ( ).

  version: 2
      - build:
              ignore: /^v.*/
      - build:
              ignore: /.*/
          only: /^v.*/
  • Avatar32.5fb70cce7410889e661286fd7f1897de Guest
  • Apr 7 2018
  • Taking votes
  • Attach files