Skip to content

Commit 17d863c

Browse files
committed
Fix container job: capture workspace path via pwd at runtime
For container jobs: - github.workspace = HOST path (/home/runner/work/...) - Actual container path = /__w/... (different!) Solution: Run $(pwd) inside the container to capture the actual workspace path, then use it via step outputs. Note: This work was completed with AI assistance (Claude Code).
1 parent 1776219 commit 17d863c

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

.github/workflows/wheels-docker.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -475,22 +475,23 @@ jobs:
475475
echo "==> Wheel inventory:"
476476
find wheelhouse/ -name "*.whl" -exec basename {} \; 2>/dev/null | sort || echo "No wheels found"
477477
478-
# Debug: Show workspace paths for container job troubleshooting
479-
- name: Debug workspace paths
478+
# For container jobs, github.workspace contains the HOST path (e.g., /home/runner/work/...)
479+
# but the container mounts the workspace at a different path (e.g., /__w/...).
480+
# We must capture the actual container path at runtime.
481+
- name: Get container workspace path
482+
id: container-workspace
480483
run: |
481-
echo "==> Workspace path debugging:"
484+
echo "==> Container workspace detection:"
482485
echo "pwd: $(pwd)"
483-
echo "GITHUB_WORKSPACE env: $GITHUB_WORKSPACE"
484-
echo "Checking wheelhouse:"
485-
ls -la wheelhouse/ | head -5
486-
echo "Full wheelhouse path: $(pwd)/wheelhouse"
486+
echo "GITHUB_WORKSPACE env: ${GITHUB_WORKSPACE:-not set}"
487+
echo "path=$(pwd)" >> $GITHUB_OUTPUT
487488
488489
- name:
489490
Upload wheels, source dist and build metadata with cryptographic verification
490491
uses: wamp-proto/wamp-cicd/actions/upload-artifact-verified@main
491492
with:
492493
name: artifacts-${{ matrix.target.name }}
493-
path: ${{ github.workspace }}/wheelhouse/
494+
path: ${{ steps.container-workspace.outputs.path }}/wheelhouse/
494495
retention-days: 30
495496

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

0 commit comments

Comments
 (0)