Skip to content

Commit

Permalink
FIX: Use $GITHUB_ACTION_PATH to locate pixi.lock for downstream users (
Browse files Browse the repository at this point in the history
…#96)

* As the GitHub Action is being used in other workflows, it does not know the
  local file paths and so to have prefix-dev/setup-pixi find the lock file and
  'pixi run' know where `upload_wheels.sh` is, the environmental variable
  'GITHUB_ACTION_PATH' is used through the '${{ github.action_path }}' context.
   - c.f. https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables
  • Loading branch information
MridulS authored Sep 30, 2024
1 parent e5087b7 commit 40829e9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ runs:
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
# Avoid post cleanup errors if action run multiple times
post-cleanup: false
# Action consumers should load the lock file from the action repo
manifest-path: ${{ github.action_path }}/pixi.toml

- name: Upload wheels
shell: bash
Expand All @@ -43,4 +45,4 @@ runs:
INPUT_ANACONDA_NIGHTLY_UPLOAD_TOKEN: ${{ inputs.anaconda_nightly_upload_token }}
INPUT_ANACONDA_NIGHTLY_UPLOAD_LABELS: ${{ inputs.anaconda_nightly_upload_labels }}
run: |
pixi run upload_wheels.sh
pixi run ${{ github.action_path }}/upload_wheels.sh

0 comments on commit 40829e9

Please sign in to comment.