update conda lockfile #40
This file contains hidden or 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: | |
| branches: | |
| - main | |
| - dev | |
| paths: | |
| - .github/workflows/create-conda-lock.yml | |
| - ci/environment.yml | |
| pull_request: | |
| branches: | |
| - main | |
| - dev | |
| paths: | |
| - .github/workflows/create-conda-lock.yml | |
| - ci/environment.yml | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| - name: install conda-lock with micromamba | |
| uses: mamba-org/setup-micromamba@v2 | |
| with: | |
| environment-name: locker | |
| create-args: conda-lock | |
| cache-environment: true | |
| - name: run conda-lock | |
| shell: bash -el {0} | |
| working-directory: ci | |
| run: | | |
| conda-lock lock --mamba --file environment.yml --platform linux-64 | |
| - name: commit changes to tracked files | |
| id: commit | |
| run: | | |
| if [[ $(git ls-files --modified) ]]; then | |
| git config --global user.name 'github-actions[bot]' | |
| git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com' | |
| git commit --all --message "[bot] autogenerated conda-lock files" | |
| git push | |
| echo "committed=true" >> $GITHUB_OUTPUT | |
| fi | |
| - name: comment on PR | |
| if: steps.commit.outputs.committed == 'true' && github.event_name == 'pull_request' | |
| uses: peter-evans/create-or-update-comment@v4 | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body: | | |
| `conda-lock.yml` has been updated. To build and test a Docker image from this branch, trigger the [Build and push Docker image](../actions/workflows/build.yml) workflow manually and select this branch. |