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-08-25 07:17:21 +00:00
|
|
|
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.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
|
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 }}
|