Skip to content

SonarCloud Nightly #543

SonarCloud Nightly

SonarCloud Nightly #543

Workflow file for this run

# A workflow that runs SonarQube
name: SonarCloud Nightly
on:
schedule:
- cron: '4 4 * * *'
workflow_dispatch:
push:
branches: [ main ]
# Declare default permissions as read only.
permissions:
contents: read
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@1f99358870fe1c846a3ccba386cc2b2246836776 # v2.2.1
with:
egress-policy: block
allowed-endpoints: >
github.com:443
scanner.sonarcloud.io:443
sonarcloud.io:443
- name: "Checkout code"
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
with:
persist-credentials: false
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@9c0534dd12d09f22d69fbb301a1955249e49d910
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}