diff --git a/.github/workflows/build_pr.yml b/.github/workflows/build_pr.yml index 292ff71..3965144 100644 --- a/.github/workflows/build_pr.yml +++ b/.github/workflows/build_pr.yml @@ -17,6 +17,7 @@ jobs: with: cache-read-only: ${{ !startsWith(github.ref, 'refs/heads/1.') }} - name: Build + id: build run: | ./gradlew build - name: Publish @@ -33,7 +34,7 @@ jobs: ./gradlew test - name: Upload Test Report uses: actions/upload-artifact@v3 - if: success() || failure() + if: (success() || failure()) && steps.build.conclusion == 'success' with: name: junit-test-results path: "*/build/test-results/test/TEST-*.xml" diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml index 46270c0..caf1338 100644 --- a/.github/workflows/snapshot.yml +++ b/.github/workflows/snapshot.yml @@ -18,6 +18,7 @@ jobs: - uses: gradle/gradle-build-action@v2 name: Setup Gradle - name: Build + id: build run: | ./gradlew build - name: Publish @@ -34,7 +35,7 @@ jobs: ./gradlew test - name: Upload Test Report uses: actions/upload-artifact@v3 - if: success() || failure() + if: (success() || failure()) && steps.build.conclusion == 'success' with: name: junit-test-results path: "*/build/test-results/test/TEST-*.xml"