1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +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:
Charles-Edouard Brétéché 2023-01-06 23:09:39 +01:00 committed by GitHub
parent 1545acb6ba
commit 237784cc12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,9 +19,16 @@ jobs:
steps:
- name: Checkout
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
if: steps.checksecret.outputs.result == 'true'
uses: ./.github/actions/setup-build-env
- name: SonarCloud Scan
if: steps.checksecret.outputs.result == 'true'
uses: sonarsource/sonarcloud-github-action@cb201f3b2d7a38231a8c042dfea4539c8bea180b # v1.8
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}