Create conda-lock.yaml #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: update conda lockfile | |
on: | |
push: | |
paths: | |
- .github/workflows/conda-lock.yaml | |
- environment.yml | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@main | |
- name: install conda-lock with micromamba | |
uses: mamba-org/setup-micromamba@main | |
with: | |
environment-name: locker | |
create-args: conda-lock | |
cache-environment: true | |
- name: run conda-lock | |
shell: bash -el {0} | |
run: | | |
conda-lock lock --mamba --file environment.yml --platform linux-64 | |
- name: commit changes to tracked files | |
run: | | |
if [[ $(git ls-files --modified) ]]; then | |
git config --global user.name 'actions-bot' | |
git config --global user.email '[email protected]' | |
git commit --all --message "[bot] autogenerated conda-lock files" | |
git push | |
fi |