diff --git a/.github/quarkus-github-bot.yml b/.github/quarkus-github-bot.yml new file mode 100644 index 0000000000..ea4959dcde --- /dev/null +++ b/.github/quarkus-github-bot.yml @@ -0,0 +1,6 @@ +--- +# The format of this file is documented here: +# https://github.com/quarkusio/quarkus-bot#triage-issues +features: [ANALYZE_WORKFLOW_RUN_RESULTS] +workflowRunAnalysis: + workflows: ["CI Build"] diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dd48881e3d..30a5448b84 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,8 +21,28 @@ on: env: LANG: en_US.UTF-8 jobs: + # This is a hack to work around a GitHub API limitation: + # when the PR is coming from another fork, the pull_requests field of the + # workflow_run payload is empty. + # For more details, see + # https://github.community/t/pull-request-attribute-empty-in-workflow-run-event-object-for-pr-from-forked-repo/154682 + attach-pr-number: + runs-on: ubuntu-latest + name: Attach pull request number + if: github.event_name == 'pull_request' + steps: + - name: Create file + shell: bash + run: | + echo -n ${{ github.event.number }} > pull-request-number + - name: Upload pull request number + uses: actions/upload-artifact@v2 + with: + name: pull-request-number-${{ github.event.number }} + path: pull-request-number + retention-days: 1 build: - name: Build and test + name: Build - JDK ${{ matrix.java }} runs-on: ubuntu-latest strategy: fail-fast: false @@ -52,6 +72,16 @@ jobs: - name: Delete Local Artifacts From Cache shell: bash run: rm -rf ~/.m2/repository/io/quarkus/quarkus-universe-bom* + - name: Upload build reports (if build failed) + uses: actions/upload-artifact@v2 + if: ${{ failure() || cancelled() }} + with: + name: "build-reports-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 diff --git a/pom.xml b/pom.xml index e4af79ecf8..a484379ca1 100644 --- a/pom.xml +++ b/pom.xml @@ -104,6 +104,13 @@ + + + io.quarkus.bot + build-reporting-maven-extension + 1.0.5 + +