Skip to content

Commit 0deb6c0

Browse files
fix: trigger SonarCloud after release and remove redundant main push … (#1011)
## User-Facing Changes N/A ## Description After a release, the SonarCloud analysis on `main` was showing an outdated project version and stale code coverage because: 1. The `release.yml` commit uses `[skip actions]`, which skips all workflows — including SonarCloud 2. The previous push-triggered Sonar analysis ran on the merge commit (before the version bump), so it always reported the old version This PR fixes the issue by: - **Adding a step in `release.yml`** to explicitly trigger the SonarCloud workflow on `main` via `gh workflow run` after the release is complete — ensuring analysis runs with the correct version - **Removing `main` from the push trigger in `sonarqube.yml`** to avoid a redundant (and outdated) Sonar run on every merge to `main` Related to #1009 ## Checklist - [x] The web version was tested and it is running ok - [x] The desktop version was tested and it is running ok - [ ] This change is covered by unit tests - [x] Files constants.ts, types.ts and *.style.ts have been checked and relevant code snippets have been relocated Co-authored-by: Bezerra Luiz, (Luiz.Bezerra@ctw.bmwgroup.com) <198787532+luiz-bezerra-ctw-bmwgroup-com_QCOM@users.noreply.github.com>
1 parent 0ffeb6a commit 0deb6c0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,8 @@ jobs:
110110
dist/latest-linux.yml
111111
dist/latest-mac.yml
112112
dist/latest.yml
113+
114+
- name: Trigger SonarCloud analysis
115+
run: gh workflow run sonarqube.yml --ref main
116+
env:
117+
GH_TOKEN: ${{ secrets.LICHTBLICK_GITHUB_TOKEN }}

.github/workflows/sonarqube.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: SonarCloud
22

33
on:
44
push:
5-
branches: ["main", "develop"]
5+
branches: ["develop"]
66
pull_request:
77
types: [opened, synchronize, reopened]
88
workflow_dispatch:

0 commit comments

Comments
 (0)