Skip to content

Commit 1d8f116

Browse files
docs: Mention v2 in README.md (#249)
Signed-off-by: Julien Jerphanion <[email protected]> Co-authored-by: Johan Mabille <[email protected]>
1 parent a580d2e commit 1d8f116

File tree

1 file changed

+33
-23
lines changed

1 file changed

+33
-23
lines changed

README.md

+33-23
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ GitHub Action to set up the [micromamba](https://github.com/mamba-org/mamba#micr
77
## Usage
88

99
```yml
10-
- uses: mamba-org/setup-micromamba@v1
10+
- uses: mamba-org/setup-micromamba@v2
1111
with:
12-
micromamba-version: '1.5.6-0' # any version from https://github.com/mamba-org/micromamba-releases
1312
environment-file: environment.yml
1413
init-shell: >-
1514
bash
@@ -31,6 +30,17 @@ GitHub Action to set up the [micromamba](https://github.com/mamba-org/mamba#micr
3130
3231
To see all available input arguments, see the [`action.yml`](action.yml) file.
3332

33+
### Micromamba version
34+
35+
You can specify the version of micromamba to be installed using the `micromamba-version` input.
36+
37+
```yml
38+
- uses: mamba-org/setup-micromamba@v1
39+
with:
40+
# Any version from https://github.com/mamba-org/micromamba-releases
41+
micromamba-version: '1.5.6-0'
42+
```
43+
3444
### Environment creation
3545

3646
`setup-micromamba` allows you to create micromamba environments from an environment file or from a list of packages.
@@ -44,7 +54,7 @@ This will automatically activate the environment when the shell is started.
4454
#### Create environment from environment file
4555

4656
```yml
47-
- uses: mamba-org/setup-micromamba@v1
57+
- uses: mamba-org/setup-micromamba@v2
4858
with:
4959
environment-file: environment.yml
5060
```
@@ -55,7 +65,7 @@ Micromamba supports the `conda-lock` [unified lockfile format](https://conda.git
5565
Because `setup-micromamba` requires an environment name to be specified, config might look like this:
5666

5767
```yml
58-
- uses: mamba-org/setup-micromamba@v1
68+
- uses: mamba-org/setup-micromamba@v2
5969
with:
6070
environment-file: conda-lock.yml
6171
environment-name: ci
@@ -69,7 +79,7 @@ Because `setup-micromamba` requires an environment name to be specified, config
6979
You can specify extra environment specs using the `create-args` input.
7080

7181
```yml
72-
- uses: mamba-org/setup-micromamba@v1
82+
- uses: mamba-org/setup-micromamba@v2
7383
with:
7484
# the create command looks like this:
7585
# `micromamba create -n test-env python=3.10 numpy`
@@ -84,11 +94,11 @@ You can specify extra environment specs using the `create-args` input.
8494
You can specify custom arguments for the `micromamba create` command using the `create-args` input. See `micromamba create --help` for more information.
8595

8696
> [!NOTE]
87-
> This is the same argument as in the [previous example](#create-environment-from-environment-specs) but with different semantics.
97+
> This is the same argument as in the [previous example](#create-environment-from-environment-specs) but with different semantics.
8898
> 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.
8999

90100
```yml
91-
- uses: mamba-org/setup-micromamba@v1
101+
- uses: mamba-org/setup-micromamba@v2
92102
with:
93103
environment-file: environment.yml
94104
create-args: -v
@@ -102,7 +112,7 @@ By default, it will create shell initialization scripts for `bash`.
102112
If you want to customize this, you can use the `init-shell` input.
103113

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

114124
```yml
115-
- uses: mamba-org/setup-micromamba@v1
125+
- uses: mamba-org/setup-micromamba@v2
116126
with:
117127
init-shell: >-
118128
bash
@@ -137,7 +147,7 @@ You can set this behavior by specifying the `generate-run-shell` input (defaults
137147
> Only available on macOS and Linux.
138148

139149
```yml
140-
- uses: mamba-org/setup-micromamba@v1
150+
- uses: mamba-org/setup-micromamba@v2
141151
with:
142152
generate-run-shell: true
143153
environment-file: environment.yml
@@ -161,14 +171,14 @@ The action will also set the `CONDARC` environment variable to point to this fil
161171
If nothing is specified, `setup-micromamba` will create a `.condarc` next to the micromamba binary with `conda-forge` as the only channel.
162172

163173
```yml
164-
- uses: mamba-org/setup-micromamba@v1
174+
- uses: mamba-org/setup-micromamba@v2
165175
with:
166176
environment-file: environment.yml
167177
condarc-file: /path/to/.condarc
168178
```
169179

170180
```yml
171-
- uses: mamba-org/setup-micromamba@v1
181+
- uses: mamba-org/setup-micromamba@v2
172182
with:
173183
environment-file: environment.yml
174184
condarc: |
@@ -189,7 +199,7 @@ If `cache-environment` is set to `true` and `cache-environment-key` is not speci
189199
> `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.
190200

191201
```yml
192-
- uses: mamba-org/setup-micromamba@v1
202+
- uses: mamba-org/setup-micromamba@v2
193203
with:
194204
environment-file: environment.yml
195205
# only cache environment
@@ -198,7 +208,7 @@ If `cache-environment` is set to `true` and `cache-environment-key` is not speci
198208
```
199209

200210
```yml
201-
- uses: mamba-org/setup-micromamba@v1
211+
- uses: mamba-org/setup-micromamba@v2
202212
with:
203213
environment-file: environment.yml
204214
# persist only for runs on this commit.
@@ -210,7 +220,7 @@ If `cache-environment` is set to `true` and `cache-environment-key` is not speci
210220
- name: Get current date
211221
id: date
212222
run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}"
213-
- uses: mamba-org/setup-micromamba@v1
223+
- uses: mamba-org/setup-micromamba@v2
214224
with:
215225
environment-file: environment.yml
216226
# persist on the same day.
@@ -230,7 +240,7 @@ The first one is the debug logging of the action itself.
230240
This can be enabled by running the action with the `ACTIONS_STEP_DEBUG` environment variable set to `true`.
231241

232242
```yml
233-
- uses: mamba-org/setup-micromamba@v1
243+
- uses: mamba-org/setup-micromamba2v2
234244
env:
235245
ACTIONS_STEP_DEBUG: true
236246
```
@@ -248,7 +258,7 @@ The second type is the debug logging of the micromamba executable.
248258
This can be specified by setting the `log-level` input.
249259

250260
```yml
251-
- uses: mamba-org/setup-micromamba@v1
261+
- uses: mamba-org/setup-micromamba@v2
252262
with:
253263
environment-file: environment.yml
254264
# supports off, critical, error, warning, info, debug, trace
@@ -276,7 +286,7 @@ There is a total of 4 options:
276286
If nothing is specified, `setup-micromamba` will default to `shell-init`.
277287

278288
```yml
279-
- uses: mamba-org/setup-micromamba@v1
289+
- uses: mamba-org/setup-micromamba@v2
280290
with:
281291
environment-file: environment.yml
282292
post-cleanup: environment
@@ -287,7 +297,7 @@ If nothing is specified, `setup-micromamba` will default to `shell-init`.
287297
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.
288298

289299
```yml
290-
- uses: mamba-org/setup-micromamba@v1
300+
- uses: mamba-org/setup-micromamba@v2
291301
with:
292302
environment-file: environment.yml
293303
# ${{ runner.temp }}\Scripts\micromamba.exe on Windows
@@ -312,7 +322,7 @@ You can control the download behavior of micromamba with the options `download-m
312322
| Yes | true | set | Download to specified path |
313323

314324
```yml
315-
- uses: mamba-org/setup-micromamba@v1
325+
- uses: mamba-org/setup-micromamba@v2
316326
with:
317327
environment-file: environment.yml
318328
download-micromamba: false
@@ -333,7 +343,7 @@ Due to a [security limitation of GitHub Actions](https://docs.github.com/en/acti
333343
any caches created on a branch will not be available on the main/parent branch
334344
after merging. This also applies to PRs.
335345

336-
In contrast, branches *can* use a cache created on the main/parent branch.
346+
In contrast, branches *can* use a cache created on the main/parent branch.
337347

338348
See also [this thread](https://github.com/mamba-org/provision-with-micromamba/issues/42#issuecomment-1062007161).
339349

@@ -378,8 +388,8 @@ Find the reasons below (taken from [setup-miniconda](https://github.com/conda-in
378388
disabled execution of `Command Processor/Autorun` Windows registry keys, which
379389
is what `micromamba shell init cmd.exe` sets.
380390

381-
For further information, see
382-
[`jobs.<job_id>.steps[*].shell`](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell)
391+
For further information, see
392+
[`jobs.<job_id>.steps[*].shell`](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell)
383393
and [this thread](https://github.com/orgs/community/discussions/25061).
384394

385395
## Development

0 commit comments

Comments
 (0)