diff --git a/.github/workflows/maven-verify.yml b/.github/workflows/maven-verify.yml index f9cc5d74..d62d9da6 100644 --- a/.github/workflows/maven-verify.yml +++ b/.github/workflows/maven-verify.yml @@ -51,8 +51,13 @@ jobs: uses: actions/upload-artifact@v4 with: name: sonar-build - path: '**/target/' + path: | + **/target/classes/** + **/target/test-classes/** + **/target/site/jacoco/** + **/target/surefire-reports/** retention-days: 1 + if-no-files-found: error - name: Upload PR metadata if: github.event_name == 'pull_request' uses: actions/upload-artifact@v4 @@ -60,10 +65,13 @@ jobs: name: pr-meta path: .pr-meta/ retention-days: 1 + if-no-files-found: error + include-hidden-files: true generate-docs: runs-on: ubuntu-latest needs: verify + if: github.event_name == 'push' steps: - uses: actions/checkout@v6 with: diff --git a/.github/workflows/sonar-pr-analysis.yml b/.github/workflows/sonar-pr-analysis.yml index 523d2136..1b7ebb12 100644 --- a/.github/workflows/sonar-pr-analysis.yml +++ b/.github/workflows/sonar-pr-analysis.yml @@ -7,6 +7,7 @@ on: permissions: contents: read + actions: read jobs: sonar: @@ -22,13 +23,6 @@ jobs: path: .pr-meta run-id: ${{ github.event.workflow_run.id }} github-token: ${{ secrets.GITHUB_TOKEN }} - - name: Download build artifacts - uses: actions/download-artifact@v4 - with: - name: sonar-build - path: . - run-id: ${{ github.event.workflow_run.id }} - github-token: ${{ secrets.GITHUB_TOKEN }} - name: Read PR metadata id: pr-meta run: | @@ -41,6 +35,13 @@ jobs: with: ref: ${{ steps.pr-meta.outputs.head_sha }} fetch-depth: 0 + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: sonar-build + path: . + run-id: ${{ github.event.workflow_run.id }} + github-token: ${{ secrets.GITHUB_TOKEN }} - name: Set up JDK uses: actions/setup-java@v5 with: