ci: skip the artifact steps off GitHub instead of failing them

c27ea90 · Gabriel Morell · 2026-09-17 03:22

3 files +23 -15
Message
{commit_body(@commit)}

Files changed

modified .github/workflows/rust-ci.yml
+23 −15
@@ -203,29 +203,30 @@ jobs:
203 203
204 204 - name: Upload test artifact
205 205 uses: actions/upload-artifact@v4
206 − # This forge has no artifact storage, so upload-artifact fails
207 − # against it. The packages are published to the registry in the
208 − # step above, which is the thing anyone actually installs from —
209 − # failing the whole build over a copy nobody fetches would hide
210 − # real failures behind a known one.
206 + # Artifact storage is a GitHub feature; this forge has none, so
207 + # these steps have nothing to upload to. They used to run and
208 + # fail with `continue-on-error`, which is a red step on every
209 + # single run — and a build that is always a bit red teaches
210 + # everyone to stop reading it. Skipping says the same thing
211 + # honestly and leaves the badge meaningful.
211 212 #
212 − # Drop `continue-on-error` if artifact support lands, so a
213 − # genuine upload failure is visible again.
214 − continue-on-error: true
213 + # The packages are published to the forge's registries instead,
214 + # which is the thing anyone actually installs from.
215 + if: ${{ startsWith(github.server_url, 'https://github.com') }}
215 216 with:
216 217 name: koco-test-${{ matrix.arch }}-linux
217 218 path: target/release/koco
218 219
219 220 - name: Upload test Debian package
220 221 uses: actions/upload-artifact@v4
221 − continue-on-error: true
222 + if: ${{ startsWith(github.server_url, 'https://github.com') }}
222 223 with:
223 224 name: koco-test-${{ matrix.arch }}-linux.deb
224 225 path: target/debian/*.deb
225 226
226 227 - name: Upload test RPM package
227 228 uses: actions/upload-artifact@v4
228 − continue-on-error: true
229 + if: ${{ startsWith(github.server_url, 'https://github.com') }}
229 230 with:
230 231 name: koco-test-${{ matrix.arch }}-linux.rpm
231 232 path: target/generate-rpm/*.rpm
@@ -339,7 +340,7 @@ jobs:
339 340
340 341 - name: Upload release archive
341 342 uses: actions/upload-artifact@v4
342 − continue-on-error: true
343 + if: ${{ startsWith(github.server_url, 'https://github.com') }}
343 344 with:
344 345 name: ${{ matrix.name }}
345 346 path: ${{ matrix.name }}
@@ -347,7 +348,7 @@ jobs:
347 348 - name: Upload Debian package
348 349 if: runner.os == 'Linux'
349 350 uses: actions/upload-artifact@v4
350 − continue-on-error: true
351 + if: ${{ startsWith(github.server_url, 'https://github.com') }}
351 352 with:
352 353 name: koco-${{ matrix.os }}.deb
353 354 path: target/debian/*.deb
@@ -355,7 +356,7 @@ jobs:
355 356 - name: Upload RPM package
356 357 if: runner.os == 'Linux'
357 358 uses: actions/upload-artifact@v4
358 − continue-on-error: true
359 + if: ${{ startsWith(github.server_url, 'https://github.com') }}
359 360 with:
360 361 name: koco-${{ matrix.os }}.rpm
361 362 path: target/generate-rpm/*.rpm
@@ -363,7 +364,14 @@ jobs:
363 364 create-release:
364 365 name: Create Release
365 366 runs-on: arc-runner-set
366 − if: startsWith(github.ref, 'refs/tags/v')
367 + # Makes a *GitHub* Release out of artifacts a GitHub runner uploaded.
368 + # Off GitHub it would download nothing and then fail, which is the
369 + # permanently-red build this workflow is trying to stop having.
370 + # Tagged builds still publish their packages — that happens in the
371 + # build job, which runs everywhere.
372 + if: >-
373 + startsWith(github.ref, 'refs/tags/v') &&
374 + startsWith(github.server_url, 'https://github.com')
367 375 needs: release
368 376 permissions:
369 377 contents: write
@@ -372,7 +380,7 @@ jobs:
372 380
373 381 - name: Download all artifacts
374 382 uses: actions/download-artifact@v4
375 − continue-on-error: true
383 + if: ${{ startsWith(github.server_url, 'https://github.com') }}
376 384 with:
377 385 path: artifacts
378 386

Parents: 8a9ddf8