From 8c9cf0fd02af3770ce509eec4c1e59c40ddd61a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Kwiecin=CC=81ski?= Date: Fri, 16 Feb 2024 23:17:46 +0100 Subject: [PATCH] Do not run `upload-artifact` on `master` --- .github/workflows/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 681afb1..4ca74bc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -41,18 +41,21 @@ jobs: debug: true - uses: actions/upload-artifact@v4 + if: github.event_name == 'pull_request' with: name: file-diff-test-1-output path: ${{ steps.dependency-diff.outputs.file-diff }} if-no-files-found: error - uses: actions/upload-artifact@v4 + if: github.event_name == 'pull_request' with: name: file-diff-test-1-dependencies-previous path: ${{ steps.dependency-diff.outputs.dependencies-previous }} if-no-files-found: error - uses: actions/upload-artifact@v4 + if: github.event_name == 'pull_request' with: name: file-diff-test-1-dependencies-current path: ${{ steps.dependency-diff.outputs.dependencies-current }} @@ -120,6 +123,7 @@ jobs: project: "" - uses: actions/upload-artifact@v4 + if: github.event_name == 'pull_request' with: name: file-diff-test-2 path: ${{ steps.dependency-diff.outputs.file-diff }} @@ -182,7 +186,7 @@ jobs: additional-gradle-arguments: "--scan" - uses: actions/upload-artifact@v4 - if: matrix.os != 'windows-latest' # https://github.com/actions/upload-artifact/issues/337 + if: github.event_name == 'pull_request' && matrix.os != 'windows-latest' # https://github.com/actions/upload-artifact/issues/337 with: name: file-diff-test-on-${{ matrix.os }} path: ${{ steps.dependency-diff.outputs.file-diff }}