Update run_sonar_cloud.yml #1
Workflow file for this run
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 | ||
on: | ||
workflow_dispatch | ||
workflow_call | ||
jobs: | ||
sonar_cloud: | ||
name: Run SonarCloud | ||
runs-on: macos-13-xlarge # Apple Silicon Runner | ||
env: | ||
sonarToken: ${{ secrets.SONAR_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: n1hility/cancel-previous-runs@v3 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Install Tools | ||
run: | | ||
brew install sonar-scanner | ||
- name: Run Sonar | ||
if: ${{ env.sonarToken != 0 }} | ||
run: | | ||
git fetch --unshallow --no-tags | ||
sonar-scanner -Dsonar.token=${{ secrets.SONAR_TOKEN }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |