Skip to content

GitHub Actions: only run on master branch#83158

Merged
joaomoreno merged 3 commits intomicrosoft:masterfrom
ethomson:patch-1
Oct 24, 2019
Merged

GitHub Actions: only run on master branch#83158
joaomoreno merged 3 commits intomicrosoft:masterfrom
ethomson:patch-1

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.

2 participants