FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Gate the full-set artifact on failure and add the keep_artifacts hatch · unslothai/stable-diffusion.cpp@8d01773 · GitHub

Commit 8d01773

Browse files
committed
Gate the full-set artifact on failure and add the keep_artifacts hatch
1 parent 505233e commit 8d01773

1 file changed

Lines changed: 21 additions & 2 deletions

File tree

‎.github/workflows/unsloth-sd-prebuilt.yml‎

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ on:
6060
default: false
6161
required: false
6262
type: boolean
63+
keep_artifacts:
64+
description: 'Keep this run''s artifacts even if it publishes nothing (artifact-only test runs)'
65+
default: false
66+
required: false
67+
type: boolean
6368

6469
permissions:
6570
contents: read
@@ -647,12 +652,26 @@ jobs:
647652
done
648653
[ "$fail" = 0 ] || { echo "ERROR: refusing to publish a partial release" >&2; exit 1; }
649654
655+
# Only on a run that did NOT succeed, matching llama.cpp. Uploading this
656+
# unconditionally duplicated every bundle in the run -- measured at 1.34 GiB
657+
# per run, byte-for-byte the same content as the six -bin- artifacts beside
658+
# it. On a green publish those bytes are already release assets, and
659+
# reclaim below cannot delete this copy because an aggregate matches no
660+
# single asset name, so it was the largest survivor of every cleanup.
661+
#
662+
# !success() rather than failure(): a cancelled run is exactly when a
663+
# human wants the rescue bundle.
650664
- name: Upload full set (artifact fallback)
665+
if: ${{ always() && !success() }}
651666
uses: actions/upload-artifact@v4
652667
with:
653668
name: unsloth-sd-prebuilt-${{ needs.resolve.outputs.tag }}
654669
path: dist/*
655-
if-no-files-found: error
670+
# warn, not error: an early failure can leave dist/ absent, and a
671+
# missing debug bundle must not turn a diagnosable failure into a
672+
# confusing second one.
673+
if-no-files-found: warn
674+
overwrite: true
656675
retention-days: 7
657676

658677
- name: Publish GitHub release
@@ -782,7 +801,7 @@ jobs:
782801
# run's release. So the rule is simply that nothing will ever consume
783802
# these -- a publish:false dispatch is a test, and a cancelled or failed
784803
# run is not resumable past the missing legs -- and they are deleted.
785-
if: ${{ needs.assemble.outputs.published != 'true' }}
804+
if: ${{ needs.assemble.outputs.published != 'true' && inputs.keep_artifacts != true }}
786805
continue-on-error: true
787806
env:
788807
GH_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL