Skip to content

Commit

Permalink
docs: update action documentation (#1174)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruben-arts authored Apr 16, 2024
1 parent 219d7a9 commit a2ea787
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ You can use pixi in GitHub Actions to install dependencies and run commands.
It supports automatic caching of your environments.

```yml
- uses: prefix-dev/setup-pixi@v0.5.1
- uses: prefix-dev/setup-pixi@v0.6.0
- run: pixi run cowpy "Thanks for using pixi"
```
Expand Down
27 changes: 14 additions & 13 deletions docs/advanced/github_actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ We created [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) to
## Usage

```yaml
- uses: prefix-dev/setup-pixi@v0.5.1
- uses: prefix-dev/setup-pixi@v0.6.0
with:
pixi-version: v0.19.1
cache: true
Expand All @@ -24,7 +24,7 @@ We created [prefix-dev/setup-pixi](https://github.com/prefix-dev/setup-pixi) to
!!!warning "Pin your action versions"
Since pixi is not yet stable, the API of this action may change between minor versions.
Please pin the versions of this action to a specific version (i.e., `prefix-dev/setup-pixi@v0.5.1`) to avoid breaking changes.
Please pin the versions of this action to a specific version (i.e., `prefix-dev/setup-pixi@v0.6.0`) to avoid breaking changes.
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).

Put the following in your `.github/dependabot.yml` file to enable Dependabot for your GitHub Actions:
Expand Down Expand Up @@ -111,7 +111,7 @@ test:
environment: [py311, py312]
steps:
- uses: actions/checkout@v4
- uses: prefix-dev/setup-pixi@v0.5.1
- uses: prefix-dev/setup-pixi@v0.6.0
with:
environments: ${{ matrix.environment }}
```
Expand All @@ -121,7 +121,7 @@ test:
The following example will install both the `py311` and the `py312` environment on the runner.

```yaml
- uses: prefix-dev/setup-pixi@v0.5.1
- uses: prefix-dev/setup-pixi@v0.6.0
with:
environments: >- # (1)!
py311
Expand Down Expand Up @@ -161,7 +161,7 @@ Specify the token using the `auth-token` input argument.
This form of authentication (bearer token in the request headers) is mainly used at [prefix.dev](https://prefix.dev).

```yaml
- uses: prefix-dev/setup-pixi@v0.5.1
- uses: prefix-dev/setup-pixi@v0.6.0
with:
auth-host: prefix.dev
auth-token: ${{ secrets.PREFIX_DEV_TOKEN }}
Expand All @@ -173,7 +173,7 @@ Specify the username and password using the `auth-username` and `auth-password`
This form of authentication (HTTP Basic Auth) is used in some enterprise environments with [artifactory](https://jfrog.com/artifactory) for example.

```yaml
- uses: prefix-dev/setup-pixi@v0.5.1
- uses: prefix-dev/setup-pixi@v0.6.0
with:
auth-host: custom-artifactory.com
auth-username: ${{ secrets.PIXI_USERNAME }}
Expand All @@ -186,7 +186,7 @@ Specify the conda-token using the `conda-token` input argument.
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).

```yaml
- uses: prefix-dev/setup-pixi@v0.5.1
- uses: prefix-dev/setup-pixi@v0.6.0
with:
auth-host: anaconda.org # (1)!
conda-token: ${{ secrets.CONDA_TOKEN }}
Expand Down Expand Up @@ -241,7 +241,7 @@ You can specify whether `setup-pixi` should run `pixi install --frozen` or `pixi
See the [official documentation](https://prefix.dev/docs/pixi/cli#install) for more information about the `--frozen` and `--locked` flags.

```yaml
- uses: prefix-dev/setup-pixi@v0.5.1
- uses: prefix-dev/setup-pixi@v0.6.0
with:
locked: true
# or
Expand Down Expand Up @@ -271,7 +271,7 @@ The second type is the debug logging of the pixi executable.
This can be specified by setting the `log-level` input.

```yaml
- uses: prefix-dev/setup-pixi@v0.5.1
- uses: prefix-dev/setup-pixi@v0.6.0
with:
log-level: vvv # (1)!
```
Expand All @@ -298,7 +298,7 @@ If nothing is specified, `post-cleanup` will default to `true`.
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.

```yaml
- uses: prefix-dev/setup-pixi@v0.5.1
- uses: prefix-dev/setup-pixi@v0.6.0
with:
post-cleanup: true
pixi-bin-path: ${{ runner.temp }}/bin/pixi # (1)!
Expand All @@ -310,12 +310,13 @@ You can also use a preinstalled local version of pixi on the runner by not setti
`pixi-url` or `pixi-bin-path` inputs. This action will then try to find a local version of pixi in the runner's PATH.

### Using the `pyproject.toml` as a manifest file for pixi.
You can use the pyproject.toml, but it is not the default manifest file for pixi, so it's not picked up automatically, yet.
`setup-pixi` will automatically pick up the `pyproject.toml` if it contains a `[tool.pixi.project]` section and no `pixi.toml`.
This can be overwritten by setting the `manifest-path` input argument.

```yaml
- uses: prefix-dev/setup-pixi@v0.5.1
- uses: prefix-dev/setup-pixi@v0.6.0
with:
manifest-path: pyproject.toml
- run: pixi run test
```

## More examples
Expand Down

0 comments on commit a2ea787

Please sign in to comment.