Skip to content

Commit 9f4bd42

Browse files
authored
Skip artifact download if there is no built container (#412)
1 parent 62a8769 commit 9f4bd42

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/outputs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ jobs:
4040
repository: ${{ github.event.pull_request.head.repo.full_name }}
4141

4242
- name: Download container from artifact if PR
43-
if: github.event_name == 'pull_request'
43+
if: github.event_name == 'pull_request' && needs.container.result == 'success'
4444
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
4545
with:
4646
name: tutorial-container
4747
path: /tmp
4848

4949
- name: Import container from PR artifact
50-
if: github.event_name == 'pull_request'
50+
if: github.event_name == 'pull_request' && needs.container.result == 'success'
5151
run: |
5252
docker load --input /tmp/tutorial-container.tar
5353
docker image ls -a
@@ -62,7 +62,7 @@ jobs:
6262
git diff HEAD .
6363
6464
- name: Push modified files to branch
65-
if: ( github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork ) || github.event_name != 'pull_request'
65+
if: ( github.event_name == 'pull_request' && ! github.event.pull_request.head.repo.fork )
6666
run: |
6767
git config user.name "github-actions[bot]"
6868
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

0 commit comments

Comments
 (0)