Skip to content

Commit

Permalink
sonar: add sonarqube analysis env
Browse files Browse the repository at this point in the history
closes #11
  • Loading branch information
derTobsch committed Dec 5, 2024
1 parent c65e862 commit 9c6787c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
java: [ '11', '17', '21', '22', '23' ]
os: [ 'ubuntu-24.04', 'macos-14', 'windows-2022' ]
runs-on: ${{ matrix.os }}
env:
RUN_SONARQUBE_ANALYSIS: ${{ github.repository == 'focus-shift/jollyday' && matrix.java == 21 && matrix.os == 'ubuntu-24.04' && (github.event_name != 'pull_request' || (github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]')) }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -36,8 +38,8 @@ jobs:
- name: Build
run: ./mvnw -Pcoverage clean verify

- name: SonarCloud - Analyse
if: ${{ github.repository == 'focus-shift/jollyday' && matrix.java == 21 && matrix.os == 'ubuntu-24.04' && (github.event_name != 'pull_request' || (github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]')) }}
- name: SonarQube Cloud - Analyse
if: ${{ env.RUN_SONARQUBE_ANALYSIS }}
run: >
./mvnw -Pcoverage verify
sonar:sonar
Expand Down

0 comments on commit 9c6787c

Please sign in to comment.