Skip to content

Commit 5dfc943

Browse files
authored
Merge pull request #313 from NHSDigital/chore/eja-adding-main-branch-scanning-for-sonarcube
chore - adding workflow to run static analysis on main, when changes …
2 parents 4e26d08 + bbb5fd7 commit 5dfc943

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Sonar static analysis (main)
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
workflow_dispatch: {}
7+
8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: sonar-main-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
sonar_main:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout (full history)
20+
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 0
23+
24+
- name: Run static analysis script
25+
env:
26+
BRANCH_NAME: main
27+
SONAR_ORGANISATION_KEY: ${{ secrets.SONAR_ORGANISATION_KEY }}
28+
SONAR_PROJECT_KEY: ${{ secrets.SONAR_PROJECT_KEY }}
29+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
30+
FORCE_USE_DOCKER: "true"
31+
run: ./scripts/reports/perform-static-analysis.sh

0 commit comments

Comments
 (0)