Skip to content

Commit

Permalink
Update to upload-artifact@v4 and produce job summary
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmet committed Nov 21, 2024
1 parent 832b5fd commit 37a1cd3
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: |
echo -n ${{ github.event.number }} > pull-request-number
- name: Upload pull request number
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pull-request-number-${{ github.event.number }}
path: pull-request-number
Expand Down Expand Up @@ -75,15 +75,16 @@ jobs:
shell: bash
run: rm -rf ~/.m2/repository/io/quarkus/quarkus-universe-bom*
- name: Upload build reports (if build failed)
uses: actions/upload-artifact@v3
if: ${{ failure() || cancelled() }}
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: "build-reports-Build - JDK ${{ matrix.java }}"
name: "build-reports-${{ github.run_attempt }}-Build - JDK ${{ matrix.java }}"
path: |
**/target/*-reports/TEST-*.xml
target/build-report.json
LICENSE
retention-days: 2

refresh:
name: Check generated project has been updated
runs-on: ubuntu-latest
Expand Down Expand Up @@ -127,3 +128,24 @@ jobs:
with:
script: |
throw new Error('Generated project needs an update. Please run ./mvnw -Dsync and include the result in your pull request.')
build-report:
runs-on: ubuntu-latest
name: Build report
needs: [build, refresh]
if: always()
steps:
- uses: actions/download-artifact@v4
with:
path: build-reports-artifacts
pattern: "build-reports-${{ github.run_attempt }}-*"
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Produce report and add it as job summary
uses: quarkusio/action-build-reporter@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
build-reports-artifacts-path: build-reports-artifacts

0 comments on commit 37a1cd3

Please sign in to comment.