Skip to content

Comments

Limit push builds to the main branch#1730

Merged
neilvcarvalho merged 1 commit intomainfrom
nc-build-once
Jan 31, 2025
Merged

Limit push builds to the main branch#1730
neilvcarvalho merged 1 commit intomainfrom
nc-build-once

Conversation

@neilvcarvalho
Copy link
Member

@neilvcarvalho neilvcarvalho commented Jan 31, 2025

GitHub Actions has been running the lint twice in Pull Requests: once following the on push trigger, once following on pull_request. This duplication is currently avoided when running tests by an if rule, which skips if the event isn't a push or the Pull Request doesn't come from a fork.

image

This commit removes the if rule, and limits the push builds to the main branch. That will ensure that merged Pull Requests will trigger a build, and that any Pull Request activity will also trigger a build. Being a global rule for the whole build, standard will not run twice anymore.

GitHub Actions has been running the lint twice in Pull Requests: once
following the `on push` trigger, once following `on pull_request`. This
duplication is currently avoided when running tests by an `if` rule,
which skips if the event isn't a push or the Pull Request doesn't come
from a fork.

This commit removes the `if` rule, and limits the `push` builds to the
`main` branch. That will ensure that merged Pull Requests will trigger a
build, and that any Pull Request activity will also trigger a build.
Being a global rule for the whole build, `standard` will not run twice
anymore.
@neilvcarvalho neilvcarvalho merged commit a2df3a3 into main Jan 31, 2025
25 checks passed
@neilvcarvalho neilvcarvalho deleted the nc-build-once branch January 31, 2025 20:28
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.

2 participants