Skip to content

Commit 4aba8ad

Browse files
snoggetgross35
authored andcommitted
ci: Always upload successfully created artifacts
The `Create I artifacts` step is always run, whether earlier steps succeeds or not. But the upload step would only run if all preceeding steps wer successfull. Add a conditional to always run except if artifact creation failed. (backport <rust-lang#4345>) (cherry picked from commit f10e8e4)
1 parent e45d8e0 commit 4aba8ad

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,11 @@ jobs:
123123
run: ./ci/run-docker.sh ${{ matrix.target }}
124124

125125
- name: Create CI artifacts
126+
id: create_artifacts
126127
if: always()
127128
run: ./ci/create-artifacts.py
128129
- uses: actions/upload-artifact@v4
130+
if: always() && steps.create_artifacts.outcome == 'success'
129131
with:
130132
name: ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}
131133
path: ${{ env.ARCHIVE_PATH }}
@@ -192,9 +194,11 @@ jobs:
192194
run: ./ci/run-docker.sh ${{ matrix.target }}
193195

194196
- name: Create CI artifacts
197+
id: create_artifacts
195198
if: always()
196199
run: ./ci/create-artifacts.py
197200
- uses: actions/upload-artifact@v4
201+
if: always() && steps.create_artifacts.outcome == 'success'
198202
with:
199203
name: ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}
200204
path: ${{ env.ARCHIVE_PATH }}

0 commit comments

Comments
 (0)