Skip to content

Limit push builds to the main branch#527

Merged
neilvcarvalho merged 1 commit into
mainfrom
nc-build-once
Feb 7, 2025
Merged

Limit push builds to the main branch#527
neilvcarvalho merged 1 commit into
mainfrom
nc-build-once

Conversation

@neilvcarvalho
Copy link
Copy Markdown
Member

@neilvcarvalho neilvcarvalho commented Jan 31, 2025

Commits to a Pull Request branch have been triggering a build twice. That is happening because a push to a pull request is both a push and a pull_request activity.

image

This commit fixes this issue by limiting the push trigger to the main branch, ensuring that merged Pull Requests will run linting and tests on the main branch, and that any Pull Request activity will also trigger a build.

Commits to a Pull Request branch have been triggering a build twice.
That is happening because a `push` to a pull request is both a `push`
and a `pull_request` activity.

This commit fixes this issue by limiting the `push` trigger to the
`main` branch, ensuring that merged Pull Requests will run linting and
tests on the main branch, and that any Pull Request activity will also
trigger a build.
@neilvcarvalho
Copy link
Copy Markdown
Member Author

Proof this is working: past commits were triggering 18 checks, and this one is triggering 9 checks 😁

@neilvcarvalho neilvcarvalho merged commit 9216916 into main Feb 7, 2025
@neilvcarvalho neilvcarvalho deleted the nc-build-once branch February 7, 2025 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant