Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cli for use in NPM scripts #168

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

GitHub Action to set up the [micromamba](https://github.com/mamba-org/mamba#micromamba) package manager.

Also useful to download micromamba and create conda environments in npm
scripts.

## Usage

```yml
Expand Down Expand Up @@ -367,6 +370,24 @@ For further information, see
[`jobs.<job_id>.steps[*].shell`](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsshell)
and [this thread](https://github.com/orgs/community/discussions/25061).

## Use in NPM scripts

When used in NPM scripts, `setup-micromamba` provides a convenient way to
download micromamba and create conda environments.

Set options through environment variables in invocation. If micromamba has
already been downloaded or an environment already exists, it will not be
recreated.

Example:

```
"scripts": {
[...]
"micromamba": "MICROMAMBA_ROOT_PATH=micromamba CREATE_ENVIRONMENT=true CREATE_ARGS=\"python=3.11\" ENVIRONMENT_NAME=test-env setup-micromamba",
[...]
```

## Development

1. Clone this repository.
Expand Down
Loading