Halves CI on every PR push by gating feature branches through pull_request only.
The problem
A push to a branch with an open PR fires both the push and pull_request triggers, so the whole workflow (gateandmanifests) runs twice at the same point — doubling wall-clock on every PR update.
Why it's pure waste on Gitea
On GitHub the two runs differ (the pull_request run builds refs/pull/N/merge, a preview of the merged result; push builds the branch tip). But the Gitea Actions FAQ states Gitea has no merge ref — its pull_request checks out refs/pull/N/head, i.e. the same commit a branch push would. So on Gitea the two runs are byte-identical: genuine duplication, no added coverage.
The change
on:push:branches:[main] # was ['**']pull_request:# unchanged — gates every feature branch
Under the ADR-0059 "everything via PR" flow, every feature branch has a PR, so pull_request already covers them; push now only gates main (post-merge) + is unmatched by tags (release.yaml owns those). Net: one run per PR push instead of two, no coverage lost.
Forward-compatible: keeping the gate on pull_request (not push) means that if Gitea ever adds the merge-preview ref, these runs automatically upgrade to testing the merged result — for free. Your up-to-date-before-merge protection already covers the "breaks when merged" case at merge time.
The reasoning + the Gitea-FAQ citation are recorded in an on: push comment in ci.yaml.
Note: this PR still shows the doubled runs — it's gated by the old ['**'] config until it merges; the dedupe takes effect for PRs after it lands. Required check (ci / gate*) still matches the pull_request context, so branch protection is unaffected.
Halves CI on every PR push by gating feature branches through `pull_request` only.
## The problem
A push to a branch with an open PR fires **both** the `push` and `pull_request` triggers, so the whole workflow (`gate` *and* `manifests`) runs **twice** at the same point — doubling wall-clock on every PR update.
## Why it's pure waste *on Gitea*
On GitHub the two runs differ (the `pull_request` run builds `refs/pull/N/merge`, a preview of the merged result; `push` builds the branch tip). But the [Gitea Actions FAQ](https://docs.gitea.com/usage/actions/faq) states Gitea **has no merge ref** — its `pull_request` checks out `refs/pull/N/head`, i.e. the **same commit** a branch push would. So on Gitea the two runs are byte-identical: genuine duplication, no added coverage.
## The change
```yaml
on:
push:
branches: [main] # was ['**']
pull_request: # unchanged — gates every feature branch
```
Under the ADR-0059 "everything via PR" flow, every feature branch has a PR, so `pull_request` already covers them; `push` now only gates `main` (post-merge) + is unmatched by tags (release.yaml owns those). Net: one run per PR push instead of two, **no coverage lost**.
**Forward-compatible:** keeping the gate on `pull_request` (not `push`) means that if Gitea ever adds the merge-preview ref, these runs automatically upgrade to testing the merged result — for free. Your `up-to-date-before-merge` protection already covers the "breaks when merged" case at merge time.
The reasoning + the Gitea-FAQ citation are recorded in an `on: push` comment in `ci.yaml`.
---
> Note: this PR still shows the doubled runs — it's gated by the old `['**']` config until it merges; the dedupe takes effect for PRs after it lands. Required check (`ci / gate*`) still matches the `pull_request` context, so branch protection is unaffected.
A push to a branch with an open PR fired both the `push` and `pull_request`
triggers, running the gate (and manifests) twice. On Gitea those runs are
byte-identical: unlike GitHub it has no merge-preview ref, so its
`pull_request` checks out `refs/pull/N/head` — the same commit a branch push
would. Scope `push` to `main` and let `pull_request` gate feature branches:
halves CI on every PR push, loses no coverage, and is forward-compatible — if
Gitea ever adds the merge ref, these runs upgrade to testing the merged result
for free.
oli
merged commit 78272e2fd0 into main2026-06-24 10:33:17 +01:00
oli
deleted branch ci/dedupe-pr-runs2026-06-24 10:33:17 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Halves CI on every PR push by gating feature branches through
pull_requestonly.The problem
A push to a branch with an open PR fires both the
pushandpull_requesttriggers, so the whole workflow (gateandmanifests) runs twice at the same point — doubling wall-clock on every PR update.Why it's pure waste on Gitea
On GitHub the two runs differ (the
pull_requestrun buildsrefs/pull/N/merge, a preview of the merged result;pushbuilds the branch tip). But the Gitea Actions FAQ states Gitea has no merge ref — itspull_requestchecks outrefs/pull/N/head, i.e. the same commit a branch push would. So on Gitea the two runs are byte-identical: genuine duplication, no added coverage.The change
Under the ADR-0059 "everything via PR" flow, every feature branch has a PR, so
pull_requestalready covers them;pushnow only gatesmain(post-merge) + is unmatched by tags (release.yaml owns those). Net: one run per PR push instead of two, no coverage lost.Forward-compatible: keeping the gate on
pull_request(notpush) means that if Gitea ever adds the merge-preview ref, these runs automatically upgrade to testing the merged result — for free. Yourup-to-date-before-mergeprotection already covers the "breaks when merged" case at merge time.The reasoning + the Gitea-FAQ citation are recorded in an
on: pushcomment inci.yaml.