This repository has been archived by the owner on Feb 19, 2024. It is now read-only.
ci(infra): workflow file #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sonarcloud Scan | |
on: | |
schedule: | |
# Weekly on Saturdays. | |
- cron: '30 1 * * 6' | |
push: | |
branches: [ master ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
# Declare default permissions as read only. | |
permissions: read-all | |
jobs: | |
analysis: | |
name: Scorecards analysis | |
runs-on: ubuntu-22.04 | |
permissions: | |
# Needed to upload the results to code-scanning dashboard. | |
security-events: write | |
# Used to receive a badge. (Upcoming feature) | |
id-token: write | |
# Needs for private repositories. | |
contents: read | |
actions: read | |
steps: | |
- name: "Checkout code" | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: "Run analysis" | |
uses: ossf/scorecard-action@08b4669551908b1024bb425080c797723083c031 # v2.2.0 | |
with: | |
results_file: results.sarif | |
results_format: sarif | |
publish_results: true | |
- name: "Upload artifact" | |
uses: actions/upload-artifact@v3 | |
with: | |
name: SARIF file | |
path: results.sarif | |
retention-days: 5 | |
- name: "Upload to code-scanning" | |
uses: github/codeql-action/upload-sarif@3ebbd71c74ef574dbc558c82f70e52732c8b44fe # v2.2.1 | |
with: | |
sarif_file: results.sarif |