You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/integration/ci/github_actions.md
+37-22Lines changed: 37 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ We created [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) to
8
8
## Usage
9
9
10
10
```yaml
11
-
- uses: prefix-dev/setup-pixi@v0.9.4
11
+
- uses: prefix-dev/setup-pixi@v0.9.6
12
12
with:
13
13
pixi-version: v0.69.0
14
14
cache: true
@@ -19,7 +19,7 @@ We created [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) to
19
19
20
20
!!!warning "Pin your action versions"
21
21
Since pixi is not yet stable, the API of this action may change between minor versions.
22
-
Please pin the versions of this action to a specific version (i.e., `prefix-dev/setup-pixi@v0.9.4`) to avoid breaking changes.
22
+
Please pin the versions of this action to a specific version (i.e., `prefix-dev/setup-pixi@v0.9.6`) to avoid breaking changes.
23
23
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).
24
24
25
25
Put the following in your `.github/dependabot.yml` file to enable Dependabot for your GitHub Actions:
@@ -66,7 +66,7 @@ As there is no lockfile for global environments, the cache will expire at the en
66
66
This can be done by setting the `cache-write` argument.
The following example will install both the `py311` and the `py312` environment on the runner.
122
122
123
123
```yaml
124
-
- uses: prefix-dev/setup-pixi@v0.9.4
124
+
- uses: prefix-dev/setup-pixi@v0.9.6
125
125
with:
126
126
environments: >- # (1)!
127
127
py311
@@ -149,7 +149,7 @@ For instance, the `keyring`, or `gcloud` executables. The following example show
149
149
By default, global environments are not cached. You can enable caching by setting the `global-cache` input to `true`.
150
150
151
151
```yaml
152
-
- uses: prefix-dev/setup-pixi@v0.9.4
152
+
- uses: prefix-dev/setup-pixi@v0.9.6
153
153
with:
154
154
global-environments: |
155
155
google-cloud-sdk
@@ -182,7 +182,7 @@ Specify the token using the `auth-token` input argument.
182
182
This form of authentication (bearer token in the request headers) is mainly used at [prefix.dev](https://prefix.dev).
183
183
184
184
```yaml
185
-
- uses: prefix-dev/setup-pixi@v0.9.4
185
+
- uses: prefix-dev/setup-pixi@v0.9.6
186
186
with:
187
187
auth-host: prefix.dev
188
188
auth-token: ${{ secrets.PREFIX_DEV_TOKEN }}
@@ -194,7 +194,7 @@ Specify the username and password using the `auth-username` and `auth-password`
194
194
This form of authentication (HTTP Basic Auth) is used in some enterprise environments with [artifactory](https://jfrog.com/artifactory) for example.
195
195
196
196
```yaml
197
-
- uses: prefix-dev/setup-pixi@v0.9.4
197
+
- uses: prefix-dev/setup-pixi@v0.9.6
198
198
with:
199
199
auth-host: custom-artifactory.com
200
200
auth-username: ${{ secrets.PIXI_USERNAME }}
@@ -207,7 +207,7 @@ Specify the conda-token using the `conda-token` input argument.
207
207
This 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).
208
208
209
209
```yaml
210
-
- uses: prefix-dev/setup-pixi@v0.9.4
210
+
- uses: prefix-dev/setup-pixi@v0.9.6
211
211
with:
212
212
auth-host: anaconda.org # (1)!
213
213
auth-conda-token: ${{ secrets.CONDA_TOKEN }}
@@ -221,7 +221,7 @@ Specify the S3 key pair using the `auth-access-key-id` and `auth-secret-access-k
221
221
You can also specify the session token using the `auth-session-token` input argument.
@@ -233,12 +233,27 @@ You can also specify the session token using the `auth-session-token` input argu
233
233
234
234
See the [S3 section](../../deployment/s3.md) for more information about S3 authentication.
235
235
236
+
#### Restricting credentials to the install step
237
+
238
+
If you only want pixi to use the authenticated remote channel during the action's own install step
239
+
(and not in any subsequent step of the workflow), set `persist-credentials: false`. The action will
240
+
then run `pixi auth logout <auth-host>` after `pixi install` has completed but before the action
241
+
returns, so that later steps cannot reach the private channel anymore.
242
+
243
+
```yaml
244
+
- uses: prefix-dev/setup-pixi@v0.9.6
245
+
with:
246
+
auth-host: prefix.dev
247
+
auth-token: ${{ secrets.PREFIX_DEV_TOKEN }}
248
+
persist-credentials: false
249
+
```
250
+
236
251
#### PyPI keyring provider
237
252
238
253
You can specify whether to use keyring to look up credentials for PyPI.
239
254
240
255
```yml
241
-
- uses: prefix-dev/setup-pixi@v0.9.4
256
+
- uses: prefix-dev/setup-pixi@v0.9.6
242
257
with:
243
258
pypi-keyring-provider: subprocess # one of 'subprocess', 'disabled'
244
259
```
@@ -314,15 +329,15 @@ To this end, `setup-pixi` adds all environment variables set when executing `pix
314
329
As a result, all installed binaries can be accessed without having to call `pixi run`.
315
330
316
331
```yaml
317
-
- uses: prefix-dev/setup-pixi@v0.9.4
332
+
- uses: prefix-dev/setup-pixi@v0.9.6
318
333
with:
319
334
activate-environment: true
320
335
```
321
336
322
337
If you are installing multiple environments, you will need to specify the name of the environment that you want to be activated.
323
338
324
339
```yaml
325
-
- uses: prefix-dev/setup-pixi@v0.9.4
340
+
- uses: prefix-dev/setup-pixi@v0.9.6
326
341
with:
327
342
environments: >-
328
343
py311
@@ -339,7 +354,7 @@ You can specify whether `setup-pixi` should run `pixi install --frozen` or `pixi
339
354
See the [official documentation](../../reference/cli/pixi/install.md#update-options) for more information about the `--frozen` and `--locked` flags.
340
355
341
356
```yaml
342
-
- uses: prefix-dev/setup-pixi@v0.9.4
357
+
- uses: prefix-dev/setup-pixi@v0.9.6
343
358
with:
344
359
locked: true
345
360
# or
@@ -369,7 +384,7 @@ The second type is the debug logging of the pixi executable.
369
384
This can be specified by setting the `log-level` input.
370
385
371
386
```yaml
372
-
- uses: prefix-dev/setup-pixi@v0.9.4
387
+
- uses: prefix-dev/setup-pixi@v0.9.6
373
388
with:
374
389
log-level: vvv # (1)!
375
390
```
@@ -396,7 +411,7 @@ If nothing is specified, `post-cleanup` will default to `true`.
396
411
On 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.
397
412
398
413
```yaml
399
-
- uses: prefix-dev/setup-pixi@v0.9.4
414
+
- uses: prefix-dev/setup-pixi@v0.9.6
400
415
with:
401
416
post-cleanup: true
402
417
pixi-bin-path: ${{ runner.temp }}/bin/pixi # (1)!
@@ -412,7 +427,7 @@ You can also use a preinstalled local version of pixi on the runner by not setti
412
427
This can be overwritten by setting the `manifest-path` input argument.
413
428
414
429
```yaml
415
-
- uses: prefix-dev/setup-pixi@v0.9.4
430
+
- uses: prefix-dev/setup-pixi@v0.9.6
416
431
with:
417
432
manifest-path: pyproject.toml
418
433
```
@@ -422,7 +437,7 @@ This can be overwritten by setting the `manifest-path` input argument.
422
437
If you're working with a monorepo where your pixi project is in a subdirectory, you can use the `working-directory` input to specify where pixi should look for manifest files (`pixi.toml` or `pyproject.toml`).
423
438
424
439
```yml
425
-
- uses: prefix-dev/setup-pixi@v0.9.4
440
+
- uses: prefix-dev/setup-pixi@v0.9.6
426
441
with:
427
442
working-directory: ./packages/my-project
428
443
```
@@ -441,7 +456,7 @@ This will make pixi look for `pixi.toml` or `pyproject.toml` in the `./packages/
441
456
You can combine `working-directory` with `manifest-path` if needed:
442
457
443
458
```yml
444
-
- uses: prefix-dev/setup-pixi@v0.9.4
459
+
- uses: prefix-dev/setup-pixi@v0.9.6
445
460
with:
446
461
working-directory: ./packages/my-project
447
462
manifest-path: custom-pixi.toml
@@ -452,7 +467,7 @@ You can combine `working-directory` with `manifest-path` if needed:
452
467
If you only want to install pixi and not install the current workspace, you can use the `run-install` option.
453
468
454
469
```yml
455
-
- uses: prefix-dev/setup-pixi@v0.9.4
470
+
- uses: prefix-dev/setup-pixi@v0.9.6
456
471
with:
457
472
run-install: false
458
473
```
@@ -463,7 +478,7 @@ You can also download pixi from a custom URL by setting the `pixi-url` input arg
463
478
Optionally, you can combine this with the `pixi-url-headers` input argument to supply additional headers for the download request, such as a bearer token.
0 commit comments