Created
October 17, 2023 09:37
-
-
Save iamcryptoki/514bf2e23d5682841ee273a78cbb7d84 to your computer and use it in GitHub Desktop.
SonarQube scans with GitHub Actions
This file contains hidden or 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: SonarQube Scan | |
on: | |
pull_request: | |
branches: ['main'] | |
types: [edited, opened, reopened, synchronize] | |
jobs: | |
build: | |
name: Scan | |
runs-on: ubuntu-latest | |
permissions: read-all | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: sonarsource/sonarqube-scan-action@master | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} | |
- uses: sonarsource/sonarqube-quality-gate-action@master | |
timeout-minutes: 5 | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment