ci: fix the CI for PRs from forked projects (#11) #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: CI | ||
on: | ||
push: | ||
branches: | ||
- main | ||
permissions: | ||
contents: read | ||
jobs: | ||
sonarqube: | ||
name: SonarQube Trigger | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
if: ${{ secrets.SONAR_TOKEN != '' }} | ||
Check failure on line 20 in .github/workflows/sonar.yml GitHub Actions / CIInvalid workflow file
|
||
with: | ||
# Disabling shallow clone is recommended for improving relevancy of reporting | ||
fetch-depth: 0 | ||
- name: SonarQube Scan | ||
uses: sonarsource/sonarqube-scan-action@aecaf43ae57e412bd97d70ef9ce6076e672fe0a9 | ||
if: ${{ secrets.SONAR_TOKEN != '' }} | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
SONAR_HOST_URL: ${{ secrets.SONAR_HOST }} | ||
with: | ||
args: > | ||
-Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }} |