Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
37 changes: 37 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1326,3 +1326,40 @@ jobs:
echo "Unexpected success!"
exit 1
if: ${{ steps.test.outcome != 'failure' }}

configuration:
timeout-minutes: 10
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Move pixi.toml
run: mv test/default/* .
- uses: ./
with:
cache: false
configuration: |
change-ps1 = false
- name: Check configuration file was created (Unix)
run: |
test -f ~/.pixi/config.toml
cat ~/.pixi/config.toml
grep -q "change-ps1 = false" ~/.pixi/config.toml
shell: bash
if: matrix.os != 'windows-latest'
- name: Check configuration file was created (Windows)
run: |
if (!(Test-Path "$env:USERPROFILE\.pixi\config.toml")) {
Write-Error "Config file not found"
exit 1
}
Get-Content "$env:USERPROFILE\.pixi\config.toml"
if (!(Select-String -Path "$env:USERPROFILE\.pixi\config.toml" -Pattern "change-ps1 = false" -Quiet)) {
Write-Error "Configuration not found in config file"
exit 1
}
if: matrix.os == 'windows-latest'
- run: pixi run python --version | grep -q 3.11
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,22 @@ If you only want to install pixi and not install the current project, you can us
run-install: false
```

### Global configuration

You can specify global pixi configuration in TOML format using the `configuration` input.
This allows you to customize pixi's behavior by setting various configuration options.

```yml
- uses: prefix-dev/setup-pixi@v0.9.4
with:
configuration: |
run-post-link-scripts = "insecure"
```

The configuration will be written to `~/.pixi/config.toml` before pixi runs any commands.
You can specify any valid pixi configuration option.
For more information about available configuration options, see the [pixi configuration documentation](https://pixi.sh/latest/reference/pixi_configuration/).

### Download pixi from a custom URL

You can also download pixi from a custom URL by setting the `pixi-url` input argument.
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ inputs:
description: |
If the action should clean up after itself. Defaults to `true`.
If `true`, the pixi environment, the pixi binary and the rattler files in ~/.rattler and ~/.cache/rattler are removed.
configuration:
description: |
Global pixi configuration in TOML format. Will be written to ~/.pixi/config.toml.
For example, to enable insecure post-link scripts: `run-post-link-scripts = "insecure"`

runs:
using: node24
Expand Down
Loading