From 9f4bd4264fd346513259b2aa6da668cf196db2b7 Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Mon, 18 Nov 2024 01:55:11 -0500 Subject: [PATCH] Skip artifact download if there is no built container (#412) --- .github/workflows/outputs.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/outputs.yml b/.github/workflows/outputs.yml index a9905b3f2..3552c5d32 100644 --- a/.github/workflows/outputs.yml +++ b/.github/workflows/outputs.yml @@ -40,14 +40,14 @@ jobs: repository: ${{ github.event.pull_request.head.repo.full_name }} - name: Download container from artifact if PR - if: github.event_name == 'pull_request' + if: github.event_name == 'pull_request' && needs.container.result == 'success' uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 with: name: tutorial-container path: /tmp - name: Import container from PR artifact - if: github.event_name == 'pull_request' + if: github.event_name == 'pull_request' && needs.container.result == 'success' run: | docker load --input /tmp/tutorial-container.tar docker image ls -a @@ -62,7 +62,7 @@ jobs: git diff HEAD . - name: Push modified files to branch - if: ( github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork ) || github.event_name != 'pull_request' + if: ( github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork ) run: | git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com"