How to ignore pushes to default (master) branch

We want to avoid triggering any action on our default/master branch.

We only build branch and tags. So I have no jobs/workflows defined for master branch but CircleCI still creates a ‘No Workflow’ everytime we push to master branch.

I’ve tried using [skip ci] and creating a dummy ‘do-nothing’ job for pushes to master branch but this is an ugly work-around. You can see them as the top two builds in the attached image. I also don’t want to change our default branch from master as there are various Github dependencies on this.

How can I hide/ignore master branch?

If you go to the Project’s ‘Advance Settings’, ‘Advanced’ you may find settings that help (or you may not), I do not know what you will find as I use Bitbucket.

For Bitbucket the circleci documentation talks about making changes to the webhook configuration so that Bitbucket restricts the events that trigger a build. I do not know what can be done with the other repo platforms.

As you are finding circleci basically reports on every event that causes a job to start, with ‘no workflow’ indicating that after the config.yml file has been processed no work was started.

Thank you for the reply but nothing in the Project’s “Advance Setting” has solved this issue.

Looking at webhooks in github there don’t seem to be an option to prevent sending a webhook just for a specific branch

Samething happend for me. How to prevent it. I only want two brach, production and staging but everythime we checking into master, CI show one record with No workflow for master brach

workflows:
version: 2

build-and-deploy:
jobs:
- build:
filters:
branches:
only:
- staging
- production
- deploy:
requires:
- build
filters:
branches:
only:
- production
- staging

There is no solution to this problem. CircleCI insists on triggering a workflow for all tags and branches.

The no workflow entry on the dashboard is an indication that the repo has triggered the CircleCI platform via a webhook, but when the config.yml file was processed no work was started.

These entries can be excluded from the GUI view by de-selecting the ‘Not Run’ option from the filter drop-down list.

To stop such entries from being created you would need to see if your repo platform has any local controls to stop the webhook being activated.

I can not comment on other repo platforms, but for Bitbucket there has been an outstanding feature request for such functionality from 2015, which compared to some entries on their backlog makes this rather young. They have just completed a Confluence entry that had been around for over 18 years.

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