Skip to content

Commit

Permalink
Add deprecation warning (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelzw committed May 22, 2023
1 parent e2b397b commit 3c96c0c
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 1 deletion.
105 changes: 104 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,110 @@
# provision-with-micromamba
<h3 align="center">⛔️ This project is deprecated and no longer gets maintained!</h3>

Please use the [mamba-org/setup-micromamba](https://github.com/mamba-org/setup-micromamba) action instead.

![Deprecated](https://img.shields.io/badge/Status-Deprecated-critical)
[![test](https://github.com/mamba-org/provision-with-micromamba/workflows/test/badge.svg)](https://github.com/mamba-org/provision-with-micromamba/actions?query=workflow%3Atest)

# Migration to `setup-micromamba`

This action is deprecated and will no longer get maintained due to it being superseded by [`setup-micromamba`](https://github.com/mamba-org/setup-micromamba).
See [mamba-org/setup-micromamba#70](https://github.com/mamba-org/setup-micromamba/issues/70), [mamba-org/provision-with-micromamba#103](https://github.com/mamba-org/provision-with-micromamba/issues/103) and [mamba-org/provision-with-micromamba#114](https://github.com/mamba-org/provision-with-micromamba/issues/114) for reasons.

The most important difference for migrating is that in `setup-micromamba` you need to specify the `environment-file` argument while `provision-with-micromamba` assumed `environment.yml` by default.

`extra-specs` is now called `create-args` and should be used for all arguments that `micromamba create` supports.

## Example 1 (`environment-file`, `extra-specs`, `cache-env`, semantic versioning)

```yml
- uses: mamba-org/provision-with-micromamba@v16
with:
extra-specs: |
python=3.10
numpy
cache-env: true
```

becomes

```yml
# we now use semantic versioning for the action
# you could also use `...@v1.4.1`
# or the git sha directly `...@5d5dbebd87f7b9358c403c7a66651fa92b310105`
- uses: mamba-org/setup-micromamba@v1
with:
# environment-file is not assumed anymore
environment-file: environment.yml
create-args: >- # beware the >- instead of |, we don't split on newlines but on spaces
python=3.10
numpy
# now called cache-environment
cache-environment: true
```

## Example 2 (`micromamba-version`, `environment-file: false`, `channels`)

```yml
- uses: mamba-org/provision-with-micromamba@main
with:
micromamba-version: '1.2.0'
environment-file: false
environment-name: myenv
extra-specs: |
python=3.10
numpy
channels: conda-forge
```

becomes

```yml
- uses: mamba-org/setup-micromamba@v1
with:
# all supported versions are fetched from https://github.com/mamba-org/micromamba-releases/releases now and contain the build number
micromamba-version: '1.2.0-1'
# don't provide environment-file as argument if you don't want to specify one
environment-name: myenv
create-args: >-
python=3.10
numpy
# conda-forge is the default channel now and does not need to be specified
```

## Example 3 (`channels`, `channel-priority`)

```yml
- uses: mamba-org/provision-with-micromamba@v16
with:
environment-file: false
extra-specs: |
python=3.10
numpy
channels: conda-forge,bioconda
channel-priority: strict
```

becomes

```yml
- uses: mamba-org/setup-micromamba@v1
with:
create-args: >-
python=3.10
numpy
# arguments such as channel or channel-priority that belong in the condarc should be specified there
# or in a .condarc file which can be referenced with `condarc-file: .condarc`
condarc: |
channels:
- conda-forge
- bioconda
channel_priority: strict
```

---

# provision-with-micromamba

GitHub Action to provision a CI instance using [micromamba](https://github.com/mamba-org/mamba#micromamba).

## Dependencies
Expand Down
1 change: 1 addition & 0 deletions dist/main/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ async function installEnvironment (inputs, envFilePath, envYaml) {
// --- Main ---

async function main () {
core.warning('This action is deprecated and no longer maintained. Please use mamba-org/setup-micromamba instead. See `https://github.com/mamba-org/provision-with-micromamba#migration-to-setup-micromamba` for a migration guide.')
// Using getInput is not safe in a post action for templated inputs.
// Therefore, we need to save the input values beforehand to the state.
const inputs = {
Expand Down

0 comments on commit 3c96c0c

Please sign in to comment.