Skip to content

Pin Conda Environments #1

Pin Conda Environments

Pin Conda Environments #1

name: Pin Conda Environments
on:
workflow_dispatch:
env:
BRANCH_NAME: update-conda-env-pinnings
concurrency:
group: pin-conda-envs-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
pull-requests: write
jobs:
pin-linux-64:
name: Pin conda envs (linux-64)
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Fail if update branch already exists
run: |
if git ls-remote --exit-code --heads origin "${BRANCH_NAME}" >/dev/null 2>&1; then
echo "Branch ${BRANCH_NAME} already exists on origin."
exit 1
fi
- name: Pin conda environments
uses: snakemake/snakedeploy-github-action@v1
with:
subcommand: pin-conda-envs
args: workflow/envs/*.yaml
- name: Commit linux-64 pin updates
uses: stefanzweifel/git-auto-commit-action@v7
with:
commit_message: "update linux-64 conda pins"
file_pattern: workflow/envs/*.linux-64.pin.txt
branch: ${{ env.BRANCH_NAME }}
create_branch: true
- name: Create or update pull request
uses: peter-evans/create-pull-request@v8
with:
token: ${{ github.token }}
branch: ${{ env.BRANCH_NAME }}
base: main
title: "Update conda env pins"
body: |
Automated conda pin refresh generated by the pin-conda-envs workflow.
draft: false