Skip to content
Merged
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
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ GitHub Action to set up the [micromamba](https://github.com/mamba-org/mamba#micr
## Usage

```yml
- uses: mamba-org/setup-micromamba@v2
- uses: mamba-org/setup-micromamba@v3
with:
environment-file: environment.yml
init-shell: >-
Expand Down Expand Up @@ -35,7 +35,7 @@ To see all available input arguments, see the [`action.yml`](action.yml) file.
You can specify the version of micromamba to be installed using the `micromamba-version` input.

```yml
- uses: mamba-org/setup-micromamba@v2
- uses: mamba-org/setup-micromamba@v3
with:
# Any version from https://github.com/mamba-org/micromamba-releases
micromamba-version: '2.0.5-0'
Expand All @@ -54,7 +54,7 @@ This will automatically activate the environment when the shell is started.
#### Create environment from environment file

```yml
- uses: mamba-org/setup-micromamba@v2
- uses: mamba-org/setup-micromamba@v3
with:
environment-file: environment.yml
```
Expand All @@ -65,7 +65,7 @@ Micromamba supports the `conda-lock` [unified lockfile format](https://conda.git
Because `setup-micromamba` requires an environment name to be specified, config might look like this:

```yml
- uses: mamba-org/setup-micromamba@v2
- uses: mamba-org/setup-micromamba@v3
with:
environment-file: conda-lock.yml
environment-name: ci
Expand All @@ -79,7 +79,7 @@ Because `setup-micromamba` requires an environment name to be specified, config
You can specify extra environment specs using the `create-args` input.

```yml
- uses: mamba-org/setup-micromamba@v2
- uses: mamba-org/setup-micromamba@v3
with:
# the create command looks like this:
# `micromamba create -n test-env python=3.10 numpy`
Expand All @@ -98,7 +98,7 @@ You can specify custom arguments for the `micromamba create` command using the `
> This is because internally, `setup-micromamba` uses the `micromamba create` command to create the environment from the environment file and there, extra specs are specified by adding them as extra arguments to the `micromamba create` command.

```yml
- uses: mamba-org/setup-micromamba@v2
- uses: mamba-org/setup-micromamba@v3
with:
environment-file: environment.yml
create-args: -v
Expand All @@ -112,7 +112,7 @@ By default, it will create shell initialization scripts for `bash`.
If you want to customize this, you can use the `init-shell` input.

```yml
- uses: mamba-org/setup-micromamba@v2
- uses: mamba-org/setup-micromamba@v3
with:
init-shell: bash
```
Expand All @@ -122,7 +122,7 @@ In case you don't want to initialize your shell, you can set `init-shell` to `no
You can also specify multiple shells by separating them with a space (or using the `>-` YAML block scalar)

```yml
- uses: mamba-org/setup-micromamba@v2
- uses: mamba-org/setup-micromamba@v3
with:
init-shell: >-
bash
Expand All @@ -147,7 +147,7 @@ You can set this behavior by specifying the `generate-run-shell` input (defaults
> Only available on macOS and Linux.

```yml
- uses: mamba-org/setup-micromamba@v2
- uses: mamba-org/setup-micromamba@v3
with:
generate-run-shell: true
environment-file: environment.yml
Expand All @@ -171,14 +171,14 @@ The action will also set the `CONDARC` environment variable to point to this fil
If nothing is specified, `setup-micromamba` will create a `.condarc` next to the micromamba binary with `conda-forge` as the only channel.

```yml
- uses: mamba-org/setup-micromamba@v2
- uses: mamba-org/setup-micromamba@v3
with:
environment-file: environment.yml
condarc-file: /path/to/.condarc
```

```yml
- uses: mamba-org/setup-micromamba@v2
- uses: mamba-org/setup-micromamba@v3
with:
environment-file: environment.yml
condarc: |
Expand All @@ -199,7 +199,7 @@ If `cache-environment` is set to `true` and `cache-environment-key` is not speci
> `setup-micromamba` will append a hash of the environment file and the `custom-args` as well as the environment name and OS to the cache key.

```yml
- uses: mamba-org/setup-micromamba@v2
- uses: mamba-org/setup-micromamba@v3
with:
environment-file: environment.yml
# only cache environment
Expand All @@ -208,7 +208,7 @@ If `cache-environment` is set to `true` and `cache-environment-key` is not speci
```

```yml
- uses: mamba-org/setup-micromamba@v2
- uses: mamba-org/setup-micromamba@v3
with:
environment-file: environment.yml
# persist only for runs on this commit.
Expand All @@ -220,7 +220,7 @@ If `cache-environment` is set to `true` and `cache-environment-key` is not speci
- name: Get current date
id: date
run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}"
- uses: mamba-org/setup-micromamba@v2
- uses: mamba-org/setup-micromamba@v3
with:
environment-file: environment.yml
# persist on the same day.
Expand All @@ -240,7 +240,7 @@ The first one is the debug logging of the action itself.
This can be enabled by running the action with the `ACTIONS_STEP_DEBUG` environment variable set to `true`.

```yml
- uses: mamba-org/setup-micromamba2v2
- uses: mamba-org/setup-micromamba@v3
env:
ACTIONS_STEP_DEBUG: true
```
Expand All @@ -258,7 +258,7 @@ The second type is the debug logging of the micromamba executable.
This can be specified by setting the `log-level` input.

```yml
- uses: mamba-org/setup-micromamba@v2
- uses: mamba-org/setup-micromamba@v3
with:
environment-file: environment.yml
# supports off, critical, error, warning, info, debug, trace
Expand Down Expand Up @@ -286,7 +286,7 @@ There is a total of 4 options:
If nothing is specified, `setup-micromamba` will default to `shell-init`.

```yml
- uses: mamba-org/setup-micromamba@v2
- uses: mamba-org/setup-micromamba@v3
with:
environment-file: environment.yml
post-cleanup: environment
Expand All @@ -297,7 +297,7 @@ If nothing is specified, `setup-micromamba` will default to `shell-init`.
You also might want to alter the default micromamba installation location to a temporary location. You can use `micromamba-binary-path: ${{ runner.temp }}/bin/micromamba` to do this.

```yml
- uses: mamba-org/setup-micromamba@v2
- uses: mamba-org/setup-micromamba@v3
with:
environment-file: environment.yml
# ${{ runner.temp }}\Scripts\micromamba.exe on Windows
Expand All @@ -322,7 +322,7 @@ You can control the download behavior of micromamba with the options `download-m
| Yes | true | set | Download to specified path |

```yml
- uses: mamba-org/setup-micromamba@v2
- uses: mamba-org/setup-micromamba@v3
with:
environment-file: environment.yml
download-micromamba: false
Expand Down
Loading