[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
53 lines (39 loc) · 1.84 KB

README.md

File metadata and controls

53 lines (39 loc) · 1.84 KB

Conda-lock refresh GitHub Action

Regenerate fully reproducible conda-lock.yml files for conda environments.

Usage

This GitHub Action is designed to be used with the issue_comment event, such that writing a comment that starts with /condalock in a Pull Request triggers a refresh of the lockfile. See full working demo example at https://github.com/weiji14/conda-lock-refresh-demo/blob/main/.github/workflows/conda-lock.yml. However, it should be possible to use other types of workflow trigger events to refresh the lockfile too (e.g. on label creation, or schedule runs).

Sample workflow step:

- name: Run conda-lock
  uses: weiji14/conda-lock-refresh@main
  with:
    file: "environment.yml"
    kind: "lock"
    mamba: true
    platform: "linux-64"

Action inputs

See action.yml. These parameters should match the flags in the conda-lock lock command at https://conda.github.io/conda-lock/cli/gen/#conda-lock-lock

Parameter Description Default
file Path to the conda environment specification(s) "environment.yml"
kind Kind of lock file(s) to generate [should be one of 'lock', 'explicit', or 'env'] "lock"
mamba Use the mamba solver [should be either true or false] true
platform The platforms to generate the lockfile for "linux-64"

References

Original motivation

The discussion to create a reusable GitHub Action was discussed at:

Prior work

Credits to the previous work done on pangeo-docker-images and CryoCloud.