From 40829e937f309c69125c9124119ebfc11560f44f Mon Sep 17 00:00:00 2001 From: Mridul Seth Date: Mon, 30 Sep 2024 17:29:56 +0200 Subject: [PATCH] FIX: Use $GITHUB_ACTION_PATH to locate pixi.lock for downstream users (#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 --- action.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index de44a7f..db0f68d 100644 --- a/action.yml +++ b/action.yml @@ -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 @@ -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