Upgrade GitHub setup-java action.
@@ -25,20 +25,21 @@ jobs:
${{ runner.os }}-maven-
- name: Setup JDK 11
- uses: actions/setup-java@v2.2.0
+ uses: actions/setup-java@v2.3.0
with:
- distribution: 'adopt'
+ distribution: 'temurin'
java-version: 11
java-package: jdk
architecture: x64
- name: Setup JDK 8
- uses: actions/setup-java@v1
+ uses: actions/setup-java@v2.3.0
with:
- distribution: 'adopt'
+ distribution: 'temurin'
java-version: 8
java-package: jdk
architecture: x64
+ cache: 'maven'
- name: Inspect environment (Linux)
if: runner.os == 'Linux'
@@ -81,6 +82,9 @@ jobs:
report_paths: '**/*-reports/TEST-*.xml'
- name: Upload Test Reports
+ # If the CI run is not initiated from the primary repository, it is highly likely that this is a PR from a user who doesn't have commit rights.
+ # Hence, skip this step to avoid permission failures.
+ if: github.repository == 'apache/logging-log4j2'
uses: actions/upload-artifact@v2
with:
name: test-reports-${{ matrix.os }}
