Skip to content

Commit

Permalink
CI: Use a non-default path to run the upload action
Browse files Browse the repository at this point in the history
* Don't rely on the action's '$GITHUB_ACTION_PATH' variable being
  the current directory during testing.
  • Loading branch information
matthewfeickert committed Sep 30, 2024
1 parent 513d82a commit d626453
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
# Don't rely on the action's path being in the current directory
with:
path: '_action_path'

- name: Set up Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
Expand All @@ -48,13 +51,13 @@ jobs:
run: python -m zipfile --list dist/test_package-*.whl

- name: Test upload
uses: ./
uses: ./_action_path/
with:
artifacts_path: dist
anaconda_nightly_upload_token: ${{ secrets.UPLOAD_TOKEN }}

- name: Test upload that forces removal first
uses: ./
uses: ./_action_path/
with:
artifacts_path: dist
anaconda_nightly_upload_token: ${{ secrets.UPLOAD_TOKEN }}
Expand All @@ -67,7 +70,7 @@ jobs:
python -m build --outdir ./dist tests/test_package
- name: Test upload with non-main label
uses: ./
uses: ./_action_path/
with:
artifacts_path: dist
anaconda_nightly_upload_token: ${{ secrets.UPLOAD_TOKEN }}
Expand All @@ -81,7 +84,7 @@ jobs:
python -m build --outdir ./dist tests/test_package
- name: Test upload with multiple labels
uses: ./
uses: ./_action_path/
with:
artifacts_path: dist
anaconda_nightly_upload_token: ${{ secrets.UPLOAD_TOKEN }}
Expand Down

0 comments on commit d626453

Please sign in to comment.