2022-09-14 12:55:14 +05:30
|
|
|
name: Sonarcloud workflow
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'main'
|
|
|
|
- 'release*'
|
|
|
|
|
2023-01-06 16:24:55 +01:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2023-01-06 11:07:06 +01:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2022-09-14 12:55:14 +05:30
|
|
|
jobs:
|
|
|
|
sonarcloud:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-01-05 16:52:52 +01:00
|
|
|
- name: Checkout
|
2023-01-06 06:50:37 +00:00
|
|
|
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
2023-01-06 23:09:39 +01:00
|
|
|
- name: Check secret
|
|
|
|
id: checksecret
|
|
|
|
uses: ./.github/actions/is-defined
|
|
|
|
with:
|
|
|
|
value: ${{ secrets.SONAR_TOKEN }}
|
2023-01-05 16:52:52 +01:00
|
|
|
- name: Setup build env
|
2023-01-06 23:09:39 +01:00
|
|
|
if: steps.checksecret.outputs.result == 'true'
|
2023-01-05 16:52:52 +01:00
|
|
|
uses: ./.github/actions/setup-build-env
|
2022-09-14 12:55:14 +05:30
|
|
|
- name: SonarCloud Scan
|
2023-01-06 23:09:39 +01:00
|
|
|
if: steps.checksecret.outputs.result == 'true'
|
2023-01-03 12:25:19 +01:00
|
|
|
uses: sonarsource/sonarcloud-github-action@cb201f3b2d7a38231a8c042dfea4539c8bea180b # v1.8
|
2022-09-14 12:55:14 +05:30
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
|
|
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|