Skip to content

Commit

Permalink
Update sonar_pr.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
m1a2st authored Oct 23, 2023
1 parent b71fceb commit d830a05
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/sonar_pr.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: SonarCloud
on:
pull_request_target:
branches:
- main
types: [ opened, synchronize, reopened ]
# on:
# pull_request_target:
# branches:
# - main
# types: [ opened, synchronize, reopened ]
on: [ push, workflow_dispatch ]

jobs:
build:
Expand All @@ -25,17 +26,18 @@ jobs:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
# - name: Cache Maven packages
# uses: actions/cache@v3
# with:
# path: ~/.m2
# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
# restore-keys: ${{ runner.os }}-m2
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: >
mvn clean;
mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
-Dsonar.projectKey=WSA-Utopia-Discord-Bot
-Dsonar.organization=waterball-software-academy
Expand Down

0 comments on commit d830a05

Please sign in to comment.