Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Actions: only run on master branch #83158

Merged
merged 3 commits into from
Oct 24, 2019
Merged

Conversation

ethomson
Copy link
Contributor

At present, GitHub Actions is configured to build on every pull request and push to any branch.

This means that CI runs will run in duplicate for pull requests that originate from branches in the repository (ie, those not from a fork). That is to say: if you push a branch foo and then open a pull request from foo to master, you'll see duplicate builds, one for the push into foo and one for the pull request into master.

By limiting this to pushes to master and pull_requests to master, this will remove the dual build problem.

/cc @joaomoreno

@ethomson
Copy link
Contributor Author

Should I include other branches, like release branches here?

@joaomoreno joaomoreno added this to the October 2019 milestone Oct 23, 2019
@joaomoreno joaomoreno self-assigned this Oct 23, 2019
Edward Thomson and others added 2 commits October 23, 2019 19:56
Co-Authored-By: João Moreno <mail@joaomoreno.com>
Co-Authored-By: João Moreno <mail@joaomoreno.com>
@ethomson
Copy link
Contributor Author

Thanks @joaomoreno - that's exactly the syntax. I've pulled in those changes.

@joaomoreno joaomoreno merged commit 200d66a into microsoft:master Oct 24, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Mar 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants