1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00

fix: scorecard workflow (#7605)

Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
This commit is contained in:
Charles-Edouard Brétéché 2023-06-20 15:30:15 +02:00 committed by GitHub
parent f6b097db17
commit 58023c6360
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,16 +24,7 @@ jobs:
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with: with:
persist-credentials: false persist-credentials: false
- name: Check secret
id: checksecret
uses: ./.github/actions/is-defined
with:
value: ${{ secrets.SCORECARD_READ_TOKEN }}
- name: Setup build env
if: steps.checksecret.outputs.result == 'true'
uses: ./.github/actions/setup-build-env
- name: Run analysis - name: Run analysis
if: steps.checksecret.outputs.result == 'true'
uses: ossf/scorecard-action@80e868c13c90f172d68d1f4501dee99e2479f7af # v2.1.3 uses: ossf/scorecard-action@80e868c13c90f172d68d1f4501dee99e2479f7af # v2.1.3
with: with:
results_file: results.sarif results_file: results.sarif
@ -41,14 +32,12 @@ jobs:
repo_token: ${{ secrets.SCORECARD_READ_TOKEN }} repo_token: ${{ secrets.SCORECARD_READ_TOKEN }}
publish_results: true publish_results: true
- name: Upload artifact - name: Upload artifact
if: steps.checksecret.outputs.result == 'true'
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2 uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with: with:
name: SARIF file name: SARIF file
path: results.sarif path: results.sarif
retention-days: 5 retention-days: 5
- name: Upload to code-scanning - name: Upload to code-scanning
if: steps.checksecret.outputs.result == 'true'
uses: github/codeql-action/upload-sarif@cdcdbb579706841c47f7063dda365e292e5cad7a # v2.13.4 uses: github/codeql-action/upload-sarif@cdcdbb579706841c47f7063dda365e292e5cad7a # v2.13.4
with: with:
sarif_file: results.sarif sarif_file: results.sarif