ci: run push workflows only on develop, main and release tags #310

Merged
nessar merged 1 commits from feature/ci-push-trigger-filter into develop 2026-10-19 14:28:49 +02:00
Owner

Closes #309

Change

  • .gitea/workflows/ci.yml: the push trigger is filtered to branches: [develop, main] and tags: ['v*']. Tags are listed explicitly because a branch filter alone stops tag pushes. pull_request, workflow_dispatch, concurrency and every job are unchanged.
  • README.md, docs/gitea-actions.md: trigger, benchmark and image prose now match. Other branches run CI and publish branch-<slug>/sha-<SHA> only through their PR. A branch without a PR gets no automatic CI or image, so open a draft PR to get one.

Local checks

  • bun run format:check passes.
  • bun scripts/ci-policy.test.mjs and bun scripts/ci-image.test.mjs pass unchanged.
  • The parsed on: block is {"push":{"branches":["develop","main"],"tags":["v*"]},"pull_request":{"types":["opened","reopened","synchronize","edited"]},"workflow_dispatch":null}.

Live acceptance (from #309)

  • 1. Pushing the feature branch before a PR existed created no run (Actions API: 0 runs for 5d343dc).
  • 2. Opening this PR creates a pull_request run and no push run.
  • 3. A follow-up push creates only pull_request run(s) for the new commit, and the superseded one is cancelled.
  • 4. After merge, develop shows exactly one push run and branch-develop is published.
  • 5. The first real v* tag still triggers CI and promotes. This can only be confirmed at the next release.

Push events use the workflow file in the pushed commit. Existing branches keep double-running until they are rebased onto develop after this merges.

🤖 Generated with Claude Code

Closes #309 ## Change - `.gitea/workflows/ci.yml`: the push trigger is filtered to `branches: [develop, main]` and `tags: ['v*']`. Tags are listed explicitly because a branch filter alone stops tag pushes. `pull_request`, `workflow_dispatch`, concurrency and every job are unchanged. - `README.md`, `docs/gitea-actions.md`: trigger, benchmark and image prose now match. Other branches run CI and publish `branch-<slug>`/`sha-<SHA>` only through their PR. A branch without a PR gets no automatic CI or image, so open a draft PR to get one. ## Local checks - `bun run format:check` passes. - `bun scripts/ci-policy.test.mjs` and `bun scripts/ci-image.test.mjs` pass unchanged. - The parsed `on:` block is `{"push":{"branches":["develop","main"],"tags":["v*"]},"pull_request":{"types":["opened","reopened","synchronize","edited"]},"workflow_dispatch":null}`. ## Live acceptance (from #309) - [x] 1. Pushing the feature branch before a PR existed created no run (Actions API: 0 runs for `5d343dc`). - [ ] 2. Opening this PR creates a pull_request run and no push run. - [ ] 3. A follow-up push creates only pull_request run(s) for the new commit, and the superseded one is cancelled. - [ ] 4. After merge, develop shows exactly one push run and `branch-develop` is published. - [ ] 5. The first real `v*` tag still triggers CI and promotes. This can only be confirmed at the next release. Push events use the workflow file in the pushed commit. Existing branches keep double-running until they are rebased onto develop after this merges. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
nessar marked the pull request as ready for review 2026-10-19 13:51:15 +02:00
nessar scheduled this pull request to auto merge when all checks succeed 2026-10-19 13:52:16 +02:00
nessar canceled auto merging this pull request when all checks succeed 2026-10-19 13:54:10 +02:00
nessar force-pushed feature/ci-push-trigger-filter from 5d343dc94b to 510c315cc2 2026-10-19 13:59:27 +02:00 Compare
nessar added 1 commit 2026-10-19 14:17:05 +02:00
ci: run push workflows only on develop, main and release tags
CI / policy (pull_request) Successful in 8s
CI / validate (pull_request) Successful in 28s
CI / build (pull_request) Successful in 25s
CI / benchmark (pull_request) Successful in 1m30s
CI / security (pull_request) Successful in 1m5s
CI / test (pull_request) Successful in 2m31s
CI / images (pull_request) Successful in 1m21s
CI / required (pull_request) Successful in 1s
CI / policy (push) Successful in 11s
CI / validate (push) Successful in 28s
CI / build (push) Successful in 22s
CI / security (push) Successful in 1m6s
CI / benchmark (push) Successful in 1m47s
CI / test (push) Successful in 2m7s
CI / images (push) Successful in 1m17s
CI / required (push) Successful in 1s
581c637029
Every commit on a branch with an open PR ran the whole pipeline twice, once
for the push and once for the pull_request event, in separate concurrency
groups. Filter the push trigger to develop, main and v* tags so other
branches run CI and publish their images only through their PR. Tags are
listed explicitly because a branch filter alone stops tag pushes.

Update the trigger, benchmark and image prose in the README and the Gitea
Actions guide to match.

Refs #309

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nessar force-pushed feature/ci-push-trigger-filter from 510c315cc2 to 581c637029 2026-10-19 14:17:05 +02:00 Compare
nessar merged commit 581c637029 into develop 2026-10-19 14:28:49 +02:00
nessar deleted branch feature/ci-push-trigger-filter 2026-10-19 14:28:49 +02:00
Sign in to join this conversation.