forked from kyverno/kyverno
-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (31 loc) · 970 Bytes
/
sonarcloud.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Sonarcloud workflow
permissions: {}
on:
push:
branches:
- 'main'
- 'release*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
sonarcloud:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- name: Check secret
id: checksecret
uses: ./.github/actions/is-defined
with:
value: ${{ secrets.SONAR_TOKEN }}
- name: Setup build env
if: steps.checksecret.outputs.result == 'true'
uses: ./.github/actions/setup-build-env
timeout-minutes: 10
- name: SonarCloud Scan
if: steps.checksecret.outputs.result == 'true'
uses: sonarsource/sonarcloud-github-action@db501078e936e4b4c8773d1bb949ba9ddb7b6b6a # v1.9
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}