Skip to content

Commit bcd0a20

Browse files
committed
fix(ci): pass wheel filenames as job output instead of re-downloading
The trigger-wheel-publish job was downloading the wheel artifact onto a persistent self-hosted runner just to glob the filenames. Since download-artifact does not clean the destination directory, stale .whl files from every previous run accumulated in release/ and were all sent to GitLab as WHEEL_FILENAMES. Confirmed on the runner: /home/ubuntu/actions-runner/_work/OpenShell/ OpenShell/release/ contained 120+ wheels spanning versions 0.0.5 through 0.0.10. Fix: capture wheel filenames as a job output in build-python-wheels and pass them directly to trigger-wheel-publish. The trigger job no longer downloads the artifact at all — it only needs the filenames to construct GitHub release asset URLs for GitLab/Kitmaker.
1 parent cf66d05 commit bcd0a20

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

.github/workflows/release-dev.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ jobs:
9696
timeout-minutes: 120
9797
outputs:
9898
wheel_version: ${{ needs.compute-versions.outputs.python_version }}
99+
wheel_filenames: ${{ steps.filenames.outputs.wheel_filenames }}
99100
container:
100101
image: ghcr.io/nvidia/openshell/ci:latest
101102
credentials:
@@ -132,6 +133,13 @@ jobs:
132133
OPENSHELL_CARGO_VERSION="${{ needs.compute-versions.outputs.cargo_version }}" mise run python:build:macos
133134
ls -la target/wheels/*.whl
134135
136+
- name: Capture wheel filenames
137+
id: filenames
138+
run: |
139+
set -euo pipefail
140+
WHEEL_FILENAMES=$(ls target/wheels/*.whl | xargs -n1 basename | paste -sd, -)
141+
echo "wheel_filenames=${WHEEL_FILENAMES}" >> "$GITHUB_OUTPUT"
142+
135143
- name: Upload wheel artifacts
136144
uses: actions/upload-artifact@v4
137145
with:
@@ -428,31 +436,23 @@ jobs:
428436
429437
trigger-wheel-publish:
430438
name: Trigger Wheel Publish
431-
needs: [compute-versions, release-devel]
439+
needs: [compute-versions, build-python-wheels, release-devel]
432440
runs-on: [self-hosted, nv]
433441
timeout-minutes: 10
434442
steps:
435-
- name: Download wheel artifacts
436-
uses: actions/download-artifact@v4
437-
with:
438-
name: python-wheels
439-
path: release/
440-
441443
- name: Trigger GitLab CI
442444
env:
443445
GITLAB_CI_TRIGGER_TOKEN: ${{ secrets.GITLAB_CI_TRIGGER_TOKEN }}
444446
GITLAB_CI_TRIGGER_URL: ${{ secrets.GITLAB_CI_TRIGGER_URL }}
445447
RELEASE_VERSION: ${{ needs.compute-versions.outputs.python_version }}
448+
WHEEL_FILENAMES: ${{ needs.build-python-wheels.outputs.wheel_filenames }}
446449
run: |
447450
set -euo pipefail
448-
shopt -s nullglob
449-
wheel_files=(release/*.whl)
450-
if (( ${#wheel_files[@]} == 0 )); then
451-
echo "No wheel artifacts found in release/" >&2
451+
if [ -z "${WHEEL_FILENAMES}" ]; then
452+
echo "No wheel filenames provided by build job" >&2
452453
exit 1
453454
fi
454455
455-
WHEEL_FILENAMES=$(printf '%s\n' "${wheel_files[@]##*/}" | paste -sd, -)
456456
response=$(curl -X POST \
457457
--fail \
458458
--silent \

.github/workflows/release-tag.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ jobs:
116116
timeout-minutes: 120
117117
outputs:
118118
wheel_version: ${{ needs.compute-versions.outputs.python_version }}
119+
wheel_filenames: ${{ steps.filenames.outputs.wheel_filenames }}
119120
container:
120121
image: ghcr.io/nvidia/openshell/ci:latest
121122
credentials:
@@ -153,6 +154,13 @@ jobs:
153154
OPENSHELL_CARGO_VERSION="${{ needs.compute-versions.outputs.cargo_version }}" mise run python:build:macos
154155
ls -la target/wheels/*.whl
155156
157+
- name: Capture wheel filenames
158+
id: filenames
159+
run: |
160+
set -euo pipefail
161+
WHEEL_FILENAMES=$(ls target/wheels/*.whl | xargs -n1 basename | paste -sd, -)
162+
echo "wheel_filenames=${WHEEL_FILENAMES}" >> "$GITHUB_OUTPUT"
163+
156164
- name: Upload wheel artifacts
157165
uses: actions/upload-artifact@v4
158166
with:
@@ -404,32 +412,24 @@ jobs:
404412
405413
trigger-wheel-publish:
406414
name: Trigger Wheel Publish
407-
needs: [compute-versions, release]
415+
needs: [compute-versions, build-python-wheels, release]
408416
runs-on: [self-hosted, nv]
409417
timeout-minutes: 10
410418
steps:
411-
- name: Download wheel artifacts
412-
uses: actions/download-artifact@v4
413-
with:
414-
name: python-wheels
415-
path: release/
416-
417419
- name: Trigger GitLab CI
418420
env:
419421
GITLAB_CI_TRIGGER_TOKEN: ${{ secrets.GITLAB_CI_TRIGGER_TOKEN }}
420422
GITLAB_CI_TRIGGER_URL: ${{ secrets.GITLAB_CI_TRIGGER_URL }}
421423
RELEASE_VERSION: ${{ needs.compute-versions.outputs.python_version }}
422424
RELEASE_TAG: ${{ env.RELEASE_TAG }}
425+
WHEEL_FILENAMES: ${{ needs.build-python-wheels.outputs.wheel_filenames }}
423426
run: |
424427
set -euo pipefail
425-
shopt -s nullglob
426-
wheel_files=(release/*.whl)
427-
if (( ${#wheel_files[@]} == 0 )); then
428-
echo "No wheel artifacts found in release/" >&2
428+
if [ -z "${WHEEL_FILENAMES}" ]; then
429+
echo "No wheel filenames provided by build job" >&2
429430
exit 1
430431
fi
431432
432-
WHEEL_FILENAMES=$(printf '%s\n' "${wheel_files[@]##*/}" | paste -sd, -)
433433
response=$(curl -X POST \
434434
--fail \
435435
--silent \

0 commit comments

Comments
 (0)