2024-01-27 22:32:42 +00:00
|
|
|
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
|
|
|
|
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:
|
2024-09-10 14:52:09 +00:00
|
|
|
- main
|
|
|
|
- release-*
|
2022-09-14 07:25:14 +00:00
|
|
|
|
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
|
2024-10-08 09:20:08 +00:00
|
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
2023-01-06 22:09:39 +00:00
|
|
|
- name: Check secret
|
|
|
|
id: checksecret
|
|
|
|
uses: ./.github/actions/is-defined
|
|
|
|
with:
|
|
|
|
value: ${{ secrets.SONAR_TOKEN }}
|
2023-09-27 08:24:27 +00:00
|
|
|
- name: Setup caches
|
|
|
|
uses: ./.github/actions/setup-caches
|
|
|
|
timeout-minutes: 5
|
|
|
|
continue-on-error: true
|
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
|
2023-12-07 07:42:56 +00:00
|
|
|
with:
|
|
|
|
free-disk-space: false
|
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'
|
2024-10-07 10:27:19 +00:00
|
|
|
uses: sonarsource/sonarcloud-github-action@383f7e52eae3ab0510c3cb0e7d9d150bbaeab838 # v3.1.0
|
2022-09-14 07:25:14 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
|
|
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|