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:
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:
|
||||
- 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 }}
|
||||
|
|
Loading…
Reference in a new issue