@@ -23,7 +23,7 @@ GitHub Action to set up the [pixi](https://github.com/prefix-dev/pixi) package m
2323## Usage
2424
2525``` yml
26- -
uses :
prefix-dev/[email protected] .0 26+ -
uses :
prefix-dev/[email protected] .1 2727 with :
2828 pixi-version : v0.49.0
2929
@@ -35,7 +35,7 @@ GitHub Action to set up the [pixi](https://github.com/prefix-dev/pixi) package m
3535
3636> [!WARNING]
3737> Since pixi is not yet stable, the API of this action may change between minor versions.
38- > Please pin the versions of this action to a specific version (i.e., ` prefix-dev/[email protected] .0 `) to avoid breaking changes. 38+ > Please pin the versions of this action to a specific version (i.e., ` prefix-dev/[email protected] .1 `) to avoid breaking changes. 3939> You can automatically update the version of this action by using [Dependabot](https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot).
4040>
4141> Put the following in your `.github/dependabot.yml` file to enable Dependabot for your GitHub Actions:
@@ -74,7 +74,7 @@ In order to not exceed the [10 GB cache size limit](https://docs.github.com/en/a
7474This can be done by setting the `cache-write` argument.
7575
7676` ` ` yml
77- - uses: prefix-dev/[email protected] .0 77+ - uses: prefix-dev/[email protected] .1 7878 with:
7979 cache: true
8080 cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
@@ -119,7 +119,7 @@ test:
119119 environment: [py311, py312]
120120 steps:
121121 - uses: actions/checkout@v4
122- - uses: prefix-dev/[email protected] .0 122+ - uses: prefix-dev/[email protected] .1 123123 with:
124124 environments: ${{ matrix.environment }}
125125` ` `
@@ -129,7 +129,7 @@ test:
129129The following example will install both the `py311` and the `py312` environment on the runner.
130130
131131` ` ` yml
132- - uses: prefix-dev/[email protected] .0 132+ - uses: prefix-dev/[email protected] .1 133133 with:
134134 # separated by spaces
135135 environments: >-
@@ -143,14 +143,34 @@ The following example will install both the `py311` and the `py312` environment
143143> [!WARNING]
144144> If you don't specify any environment, the `default` environment will be installed and cached, even if you use other environments.
145145
146+ # ## Global Environments
147+
148+ You can specify `pixi global install` commands by setting the `global-environments` input argument.
149+ This will create one environment per line, and install them.
150+ This is useful in particular to install executables that are needed for `pixi install` to work properly.
151+ For instance, the `keyring`, or `gcloud` executables. The following example shows how to install both in separate global environments.
152+ Note that global environments are not cached.
153+
154+ ` ` ` yml
155+ - uses: prefix-dev/[email protected] 156+ with:
157+ global-environments: |
158+ google-cloud-sdk
159+ keyring --with keyrings.google-artifactregistry-auth
160+ - run: |
161+ gcloud --version
162+ keyring --list-backends
163+ ` ` `
164+
146165# ## Authentication
147166
148- There are currently three ways to authenticate with pixi :
167+ There are currently five ways to authenticate with pixi :
149168
150169- using a token
151170- using a username and password
152171- using a conda-token
153172- using an S3 key pair
173+ - using keyring for PyPI registries
154174
155175For more information, see the [pixi documentation](https://prefix.dev/docs/pixi/authentication).
156176
@@ -165,7 +185,7 @@ Specify the token using the `auth-token` input argument.
165185This form of authentication (bearer token in the request headers) is mainly used at [prefix.dev](https://prefix.dev).
166186
167187` ` ` yml
168- - uses: prefix-dev/[email protected] .0 188+ - uses: prefix-dev/[email protected] .1 169189 with:
170190 auth-host: prefix.dev
171191 auth-token: ${{ secrets.PREFIX_DEV_TOKEN }}
@@ -177,7 +197,7 @@ Specify the username and password using the `auth-username` and `auth-password`
177197This form of authentication (HTTP Basic Auth) is used in some enterprise environments with [artifactory](https://jfrog.com/artifactory) for example.
178198
179199` ` ` yml
180- - uses: prefix-dev/[email protected] .0 200+ - uses: prefix-dev/[email protected] .1 181201 with:
182202 auth-host: custom-artifactory.com
183203 auth-username: ${{ secrets.PIXI_USERNAME }}
@@ -190,7 +210,7 @@ Specify the conda-token using the `auth-conda-token` input argument.
190210This form of authentication (token is encoded in URL : ` https://my-quetz-instance.com/t/<token>/get/custom-channel` ) is used at [anaconda.org](https://anaconda.org) or with [quetz instances](https://github.com/mamba-org/quetz).
191211
192212` ` ` yml
193- - uses: prefix-dev/[email protected] .0 213+ - uses: prefix-dev/[email protected] .1 194214 with:
195215 auth-host: anaconda.org # or my-quetz-instance.com
196216 auth-conda-token: ${{ secrets.CONDA_TOKEN }}
@@ -202,7 +222,7 @@ Specify the S3 key pair using the `auth-access-key-id` and `auth-secret-access-k
202222You can also specify the session token using the `auth-session-token` input argument.
203223
204224` ` ` yaml
205- - uses: prefix-dev/[email protected] .0 225+ - uses: prefix-dev/[email protected] .1 206226 with:
207227 auth-host: s3://my-s3-bucket
208228 auth-s3-access-key-id: ${{ secrets.ACCESS_KEY_ID }}
@@ -218,11 +238,13 @@ See the [pixi documentation](https://pixi.sh/latest/advanced/s3) for more inform
218238You can specify whether to use keyring to look up credentials for PyPI.
219239
220240` ` ` yml
221- - uses: prefix-dev/[email protected] .0 241+ - uses: prefix-dev/[email protected] .1 222242 with:
223243 pypi-keyring-provider: subprocess # one of 'subprocess', 'disabled'
224244` ` `
225245
246+ You can use the [`global-environments`](#global-environments) input to install `keyring` and its backends.
247+
226248# ## Custom shell wrapper
227249
228250`setup-pixi` allows you to run command inside of the pixi environment by specifying a custom shell wrapper with `shell : pixi run bash -e {0}`.
@@ -284,15 +306,15 @@ To this end, `setup-pixi` adds all environment variables set when executing `pix
284306As a result, all installed binaries can be accessed without having to call `pixi run`.
285307
286308` ` ` yml
287- - uses: prefix-dev/[email protected] .0 309+ - uses: prefix-dev/[email protected] .1 288310 with:
289311 activate-environment: true
290312` ` `
291313
292314If you are installing multiple environments, you will need to specify the name of the environment that you want to be activated.
293315
294316` ` ` yml
295- - uses: prefix-dev/[email protected] .0 317+ - uses: prefix-dev/[email protected] .1 296318 with:
297319 environments: >-
298320 py311
@@ -309,7 +331,7 @@ You can specify whether `setup-pixi` should run `pixi install --frozen` or `pixi
309331See the [official documentation](https://prefix.dev/docs/pixi/cli#install) for more information about the `--frozen` and `--locked` flags.
310332
311333` ` ` yml
312- - uses: prefix-dev/[email protected] .0 334+ - uses: prefix-dev/[email protected] .1 313335 with:
314336 locked: true
315337 # or
@@ -328,7 +350,7 @@ The first one is the debug logging of the action itself.
328350This can be enabled by running the action with the `RUNNER_DEBUG` environment variable set to `true`.
329351
330352` ` ` yml
331- - uses: prefix-dev/[email protected] .0 353+ - uses: prefix-dev/[email protected] .1 332354 env:
333355 RUNNER_DEBUG: true
334356` ` `
@@ -346,7 +368,7 @@ The second type is the debug logging of the pixi executable.
346368This can be specified by setting the `log-level` input.
347369
348370` ` ` yml
349- - uses: prefix-dev/[email protected] .0 371+ - uses: prefix-dev/[email protected] .1 350372 with:
351373 # one of ` q`, `default`, `v`, `vv`, or `vvv`.
352374 log-level : vvv
@@ -372,7 +394,7 @@ If nothing is specified, `post-cleanup` will default to `true`.
372394On self-hosted runners, you also might want to alter the default pixi install location to a temporary location. You can use `pixi-bin-path : ${{ runner.temp }}/bin/pixi` to do this.
373395
374396` ` ` yml
375- - uses: prefix-dev/[email protected] .0 397+ - uses: prefix-dev/[email protected] .1 376398 with:
377399 post-cleanup: true
378400 # ${{ runner.temp }}\S cripts\p ixi.exe on Windows
@@ -388,7 +410,7 @@ You can also use a preinstalled local version of pixi on the runner by not setti
388410This can be overwritten by setting the `manifest-path` input argument.
389411
390412` ` ` yml
391- - uses: prefix-dev/[email protected] .0 413+ - uses: prefix-dev/[email protected] .1 392414 with:
393415 manifest-path: pyproject.toml
394416` ` `
@@ -398,7 +420,7 @@ This can be overwritten by setting the `manifest-path` input argument.
398420If you only want to install pixi and not install the current project, you can use the `run-install` option.
399421
400422` ` ` yml
401- - uses: prefix-dev/[email protected] .0 423+ - uses: prefix-dev/[email protected] .1 402424 with:
403425 run-install: false
404426` ` `
@@ -409,7 +431,7 @@ You can also download pixi from a custom URL by setting the `pixi-url` input arg
409431Optionally, you can combine this with the `pixi-url-headers` input argument to supply additional headers for the download request, such as a bearer token.
410432
411433` ` ` yml
412- - uses: prefix-dev/[email protected] .0 434+ - uses: prefix-dev/[email protected] .1 413435 with:
414436 pixi-url: https://pixi-mirror.example.com/releases/download/v0.48.0/pixi-x86_64-unknown-linux-musl
415437 pixi-url-headers: '{"Authorization": "Bearer ${{ secrets.PIXI_MIRROR_BEARER_TOKEN }}"}'
@@ -425,7 +447,7 @@ It will be rendered with the following variables:
425447By default, `pixi-url` is equivalent to the following template :
426448
427449` ` ` yml
428- - uses: prefix-dev/[email protected] .0 450+ - uses: prefix-dev/[email protected] .1 429451 with:
430452 pixi-url: |
431453 {{#if latest~}}
0 commit comments