2024-01-27 23:32:42 +01:00
|
|
|
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
|
|
|
|
2022-09-14 12:55:14 +05:30
|
|
|
name: Sonarcloud workflow
|
|
|
|
|
2023-06-30 13:44:57 +02:00
|
|
|
permissions: {}
|
|
|
|
|
2022-09-14 12:55:14 +05:30
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'main'
|
|
|
|
- 'release*'
|
|
|
|
|
2023-01-06 16:24:55 +01:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
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
|
2024-06-13 22:40:59 +00:00
|
|
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
2023-01-06 23:09:39 +01:00
|
|
|
- name: Check secret
|
|
|
|
id: checksecret
|
|
|
|
uses: ./.github/actions/is-defined
|
|
|
|
with:
|
|
|
|
value: ${{ secrets.SONAR_TOKEN }}
|
2023-09-27 10:24:27 +02:00
|
|
|
- name: Setup caches
|
|
|
|
uses: ./.github/actions/setup-caches
|
|
|
|
timeout-minutes: 5
|
|
|
|
continue-on-error: true
|
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
|
2023-08-30 22:44:51 +02:00
|
|
|
timeout-minutes: 10
|
2023-12-07 08:42:56 +01:00
|
|
|
with:
|
|
|
|
free-disk-space: false
|
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'
|
2024-08-27 08:52:19 +00:00
|
|
|
uses: sonarsource/sonarcloud-github-action@eb211723266fe8e83102bac7361f0a05c3ac1d1b # v3.0.0
|
2022-09-14 12:55:14 +05:30
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
|
|
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|