Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/assets/pixi-url-auth-test/Caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
:8080 {
@unauthorized not header Authorization "Bearer s3cr3tT0k3nABC123"
respond @unauthorized "Unauthorized: Invalid token" 401

root * ./assets
file_server
}
41 changes: 41 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,47 @@ jobs:
pixi-url: https://github.com/prefix-dev/pixi/releases/download/v0.14.0/pixi-x86_64-unknown-linux-musl
- run: pixi --version | grep -q "pixi 0.14.0"

pixi-url-bearer-token:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Move pixi.toml
run: mv test/old-pixi-lockfiles/* .
- name: Setup caddy
run: |
set -euo pipefail
curl -Ls -o caddy.tar.gz https://github.com/caddyserver/caddy/releases/download/v2.10.0/caddy_2.10.0_linux_amd64.tar.gz
tar -xzf caddy.tar.gz
chmod +x caddy

mkdir -p assets
curl -Ls -o assets/pixi https://github.com/prefix-dev/pixi/releases/download/v0.14.0/pixi-x86_64-unknown-linux-musl

cp .github/assets/pixi-url-auth-test/Caddyfile .

./caddy run --config Caddyfile &
- run: ps -aux | grep caddy
- name: Run with wrong token
uses: ./
id: wrongtoken
with:
cache: false
pixi-url: http://localhost:8080/pixi
pixi-url-bearer-token: wrongtoken
continue-on-error: true
- name: Fail if wrong token did not fail
run: |
echo "Unexpected success!"
exit 1
if: ${{ steps.wrongtoken.outcome != 'failure' }}
- name: Run with correct token
uses: ./
with:
cache: false
pixi-url: http://localhost:8080/pixi
pixi-url-bearer-token: s3cr3tT0k3nABC123
- run: pixi --version | grep -q "pixi 0.14.0"

custom-manifest-path:
strategy:
matrix:
Expand Down
2 changes: 2 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ inputs:
description: Version of pixi to install
pixi-url:
description: URL of pixi to install
pixi-url-bearer-token:
description: Bearer token to use for authentication when downloading pixi from a URL.
log-level:
description: |
Log level for the pixi CLI.
Expand Down
Loading
Loading