fix: prevent duplicate CI runs on pull request pushes (#490)

## Summary

- The CI workflow used `on: [push, pull_request]`, which fires **two** runs whenever a commit is pushed to a branch with an open PR — one for the `push` event and one for the `pull_request` event.
- Scoped the `push` trigger to `branches: [main]` only. Feature-branch pushes now trigger only via `pull_request`; direct pushes to `main` (merge commits) still trigger via `push`.

## Test plan

- [ ] Open a PR and push a new commit — verify only one CI run appears, not two
- [ ] Merge a PR to `main` — verify CI still runs via the `push` trigger

Closes #483

Co-authored-by: Thomas SharedInbox <sharedinbox@thomas-guettler.de>
Reviewed-on: https://codeberg.org/guettli/sharedinbox/pulls/490
This commit was merged in pull request #490.
This commit is contained in:
Bot of Thomas Güttler
2026-06-06 21:43:46 +02:00
committed by guettli
co-authored by guettli Thomas SharedInbox
parent 65173d323c
commit 913f9e8855
+5 -1
View File
@@ -1,5 +1,9 @@
name: CI name: CI
on: [push, pull_request] on:
push:
branches:
- main
pull_request:
jobs: jobs:
check: check:
name: Full Project Check name: Full Project Check