From 3dd091135f0b5f6619e548ae08de91bd1e6c6c7d Mon Sep 17 00:00:00 2001 From: Rodolfo Carvalho Date: Fri, 4 Sep 2026 16:52:10 +0200 Subject: [PATCH] Restrict CI push triggers to main and release branches Previously, the CI workflow triggered on all pushes (`[push, pull_request]`). When maintainers push feature branches directly to the upstream repository and open a pull request, GitHub Actions triggers two concurrent workflow runs for every commit, doubling CI runner consumption. This restricts the `push` event to `main` and `"v*.*"`, matching `.github/workflows/assets.yml`: - PRs continue to trigger CI via `pull_request` (exactly once per update). - Direct pushes and merges to `main` or release maintenance branches continue to run full CI. - Pushing feature branches to the repository no longer duplicates CI runs. --- .github/workflows/ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b4bce06377..f9e0d2cb48 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,12 @@ name: CI -on: [push, pull_request] + +on: + push: + branches: + - main + - "v*.*" + pull_request: + permissions: contents: read