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

Limit push builds to the main branch #1730

Merged
merged 1 commit into from
Jan 31, 2025
Merged

Limit push builds to the main branch #1730

merged 1 commit into from
Jan 31, 2025

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