Skip to content

Commit

Permalink
chore: Update SonarCloud configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Devasy23 committed May 8, 2024
1 parent af46e0c commit 6abe7d1
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
name: SonarCloud analysis

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]
  workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:

permissions:
  contents: read
  security-events: write
  pull-requests: read # allows SonarCloud to decorate PRs with analysis results
contents: read
security-events: write
pull-requests: read # allows SonarCloud to decorate PRs with analysis results

jobs:
  Analysis:
    runs-on: ubuntu-latest
Analysis:
runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
steps:
- name: Checkout repository
uses: actions/checkout@v4

      - name: Set up JDK 11
        uses: actions/setup-java@v2
        with:
          java-version: '11'
          distribution: 'adopt'
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'

      - name: Analyze with SonarCloud
        uses: sonarsource/sonarcloud-github-action@master
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}  # Provided by GitHub Actions, no need for custom PAT unless required
          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}  # SonarCloud secret token
- name: Analyze with SonarCloud
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Provided by GitHub Actions, no need for custom PAT unless required
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # SonarCloud secret token

0 comments on commit 6abe7d1

Please sign in to comment.