-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from nmfs-opensci/eeholmes-patch-3
Create conda-lock.yaml
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
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 |