Skip to content

Instantly share code, notes, and snippets.

@gadmel
Created February 28, 2023 22:07
Show Gist options
  • Save gadmel/f4ca8fe5e6d5226d29a4cc264a727d0a to your computer and use it in GitHub Desktop.
Save gadmel/f4ca8fe5e6d5226d29a4cc264a727d0a to your computer and use it in GitHub Desktop.
.github/workflows/sonar-frontend.yml
name: Build Frontend according to SonarCloud
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment