Skip to content

Commit 899fb69

Browse files
committed
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.
1 parent a2b2bb0 commit 899fb69

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
@@ -112,9 +112,11 @@ jobs:
112112
run: ./ci/run-docker.sh ${{ matrix.target }}
113113

114114
- name: Create CI artifacts
115+
id: create_artifacts
115116
if: always()
116117
run: ./ci/create-artifacts.py
117118
- uses: actions/upload-artifact@v4
119+
if: always() && steps.create_artifacts.outcome == 'success'
118120
with:
119121
name: ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}
120122
path: ${{ env.ARCHIVE_PATH }}
@@ -181,9 +183,11 @@ jobs:
181183
run: ./ci/run-docker.sh ${{ matrix.target }}
182184

183185
- name: Create CI artifacts
186+
id: create_artifacts
184187
if: always()
185188
run: ./ci/create-artifacts.py
186189
- uses: actions/upload-artifact@v4
190+
if: always() && steps.create_artifacts.outcome == 'success'
187191
with:
188192
name: ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}
189193
path: ${{ env.ARCHIVE_PATH }}

0 commit comments

Comments
 (0)