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 d830a05 commit ecfebc5
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/sonar_pr.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: SonarCloud
# on:
# pull_request_target:
# branches:
# - main
# types: [ opened, synchronize, reopened ]
on: [ push, workflow_dispatch ]
on:
pull_request_target:
branches:
- main
types: [ opened, synchronize, reopened ]

jobs:
build:
Expand All @@ -26,18 +25,17 @@ 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 ecfebc5

Please sign in to comment.