diff --git a/.github/workflows/sonarcloud.yaml b/.github/workflows/sonarcloud.yaml index 2fbbdd5..89de924 100644 --- a/.github/workflows/sonarcloud.yaml +++ b/.github/workflows/sonarcloud.yaml @@ -6,9 +6,7 @@ # # https://github.com/HariSekhon/Template-repo # -# License: see accompanying Hari Sekhon LICENSE file -# -# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help steer this or other code I publish +# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback # # https://www.linkedin.com/in/HariSekhon # @@ -19,6 +17,7 @@ --- name: SonarCloud + on: push: branches: @@ -38,20 +37,12 @@ permissions: contents: read pull-requests: read -concurrency: - group: ${{ github.ref }}-${{ github.workflow }} - cancel-in-progress: true - jobs: - sonarcloud: + SonarCloud: + # github.event.repository context not available in scheduled workflows + #if: github.event.repository.fork == false + if: github.repository_owner == 'HariSekhon' 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 }} + uses: HariSekhon/GitHub-Actions/.github/workflows/sonarcloud.yaml@master + secrets: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}