2022-09-14 07:25:14 +00:00
|
|
|
name: Sonarcloud workflow
|
|
|
|
|
2023-06-30 11:44:57 +00:00
|
|
|
permissions: {}
|
|
|
|
|
2022-09-14 07:25:14 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'main'
|
|
|
|
- 'release*'
|
|
|
|
|
2023-01-06 15:24:55 +00:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2022-09-14 07:25:14 +00:00
|
|
|
jobs:
|
|
|
|
sonarcloud:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-01-05 15:52:52 +00:00
|
|
|
- name: Checkout
|
2023-09-25 07:39:53 +00:00
|
|
|
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
|
2023-01-06 22:09:39 +00:00
|
|
|
- name: Check secret
|
|
|
|
id: checksecret
|
|
|
|
uses: ./.github/actions/is-defined
|
|
|
|
with:
|
|
|
|
value: ${{ secrets.SONAR_TOKEN }}
|
2023-01-05 15:52:52 +00:00
|
|
|
- name: Setup build env
|
2023-01-06 22:09:39 +00:00
|
|
|
if: steps.checksecret.outputs.result == 'true'
|
2023-01-05 15:52:52 +00:00
|
|
|
uses: ./.github/actions/setup-build-env
|
2023-08-30 20:44:51 +00:00
|
|
|
timeout-minutes: 10
|
2022-09-14 07:25:14 +00:00
|
|
|
- name: SonarCloud Scan
|
2023-01-06 22:09:39 +00:00
|
|
|
if: steps.checksecret.outputs.result == 'true'
|
2023-03-06 09:28:26 +00:00
|
|
|
uses: sonarsource/sonarcloud-github-action@db501078e936e4b4c8773d1bb949ba9ddb7b6b6a # v1.9
|
2022-09-14 07:25:14 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
|
|
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|