mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-01 09:27:10 +01:00
7533ecb93f
A push build reaches sonar.yml through workflow_run like a pull request does; until now every push was analysed as the main branch, as only master had push builds. The branch is now taken from the trusted event (workflow_run.event, head_repository, head_branch), not from the artifact: master is analysed as the main branch as before, staging with sonar.branch.name=staging, and any other push is refused instead of being analysed. Nothing runs for staging yet: build.yml builds on a push to master only. That change follows separately, once this file is on master, because workflow_run workflows run from the default branch: with build.yml first, the old sonar.yml would analyse staging as the main branch and replace master's analysis.