Skip to content

Commit 2a67cea

Browse files
committed
Fix container job: get workspace path at runtime via pwd
For container jobs, github.workspace contains the host path, not the container path, and env.GITHUB_WORKSPACE is not available in the workflow context. Solution: Capture the actual working directory at runtime using $(pwd) in a prior step, then reference it via step outputs. Note: This work was completed with AI assistance (Claude Code).
1 parent 085238e commit 2a67cea

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/wheels-docker.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -475,14 +475,18 @@ jobs:
475475
echo "==> Wheel inventory:"
476476
find wheelhouse/ -name "*.whl" -exec basename {} \; 2>/dev/null | sort || echo "No wheels found"
477477
478-
# Note: For container jobs, use $GITHUB_WORKSPACE (environment variable set inside
479-
# the container) instead of ${{ github.workspace }} (context variable with host path).
478+
# For container jobs, we need to determine the workspace path at runtime.
479+
# The github.workspace context has the host path, not the container path.
480+
- name: Get container workspace path
481+
id: workspace
482+
run: echo "path=$(pwd)" >> $GITHUB_OUTPUT
483+
480484
- name:
481485
Upload wheels, source dist and build metadata with cryptographic verification
482486
uses: wamp-proto/wamp-cicd/actions/upload-artifact-verified@main
483487
with:
484488
name: artifacts-${{ matrix.target.name }}
485-
path: ${{ env.GITHUB_WORKSPACE }}/wheelhouse/
489+
path: ${{ steps.workspace.outputs.path }}/wheelhouse/
486490
retention-days: 30
487491

488492
# GitHub Releases, PyPI, and RTD publishing are now handled by the centralized 'release' workflow

0 commit comments

Comments
 (0)