mirror of
https://github.com/kyverno/kyverno.git
synced 2025-03-31 03:45:17 +00:00
chore: do not run sonar workflow if token is not defined (#5918)
* chore: do not run sonar workflow if token is not defined Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> * pr update Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> * fix Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> * fix Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> * fix Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com> Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
parent
1545acb6ba
commit
237784cc12
1 changed files with 7 additions and 0 deletions
7
.github/workflows/sonarcloud.yaml
vendored
7
.github/workflows/sonarcloud.yaml
vendored
|
@ -19,9 +19,16 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||||
|
- name: Check secret
|
||||||
|
id: checksecret
|
||||||
|
uses: ./.github/actions/is-defined
|
||||||
|
with:
|
||||||
|
value: ${{ secrets.SONAR_TOKEN }}
|
||||||
- name: Setup build env
|
- name: Setup build env
|
||||||
|
if: steps.checksecret.outputs.result == 'true'
|
||||||
uses: ./.github/actions/setup-build-env
|
uses: ./.github/actions/setup-build-env
|
||||||
- name: SonarCloud Scan
|
- name: SonarCloud Scan
|
||||||
|
if: steps.checksecret.outputs.result == 'true'
|
||||||
uses: sonarsource/sonarcloud-github-action@cb201f3b2d7a38231a8c042dfea4539c8bea180b # v1.8
|
uses: sonarsource/sonarcloud-github-action@cb201f3b2d7a38231a8c042dfea4539c8bea180b # v1.8
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
||||||
|
|
Loading…
Add table
Reference in a new issue