fix(ci): trigger only on pull_request, the only point that can still block a merge

A push to develop/main runs after the fact for direct pushes, and a push to
main specifically only happens once Gitea has already created the merge
commit — too late to gate anything. The only trigger that runs before the
"Merge" button becomes clickable is pull_request. Simplifies the previous
push-only setup (which technically also worked via SHA-based status checks,
but was confusing to reason about) down to the one trigger that matches
intent directly.

Note: the required status check name on main's branch protection will need
updating in the Gitea UI to match the new context (something like
"CI / quality (pull_request)" instead of "CI / quality (push)").

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
william
2026-10-31 11:03:24 +01:00
co-authored by Claude Sonnet 5
parent 478ffa59ce
commit 9a66ff7f17
+5 -7
View File
@@ -1,13 +1,11 @@
name: CI name: CI
on: on:
# Un seul declenchement par commit : la protection de branche sur main verifie le statut du # Tourne uniquement sur la Pull Request, avant le clic sur "Merge" (seul moment ou un check peut
# commit exact en tete de la PR (par SHA, peu importe l'evenement qui l'a produit), donc le # encore bloquer la fusion). Un "push" sur main declenche par le merge lui-meme arriverait trop
# trigger "push" suffit deja a bloquer la fusion tant que ce commit n'est pas vert. Le trigger # tard pour bloquer quoi que ce soit.
# "pull_request" produirait un second run redondant pour le meme commit (contexte de statut pull_request:
# different, non verifie par la regle de protection "CI / quality (push)"). branches: [main]
push:
branches: [develop, main]
jobs: jobs:
quality: quality: