Skip to content

🚀 Test condalock on Pull Request branch #16

🚀 Test condalock on Pull Request branch

🚀 Test condalock on Pull Request branch #16

Workflow file for this run

# Runs conda-lock against environment.yml for reproducible environments
# Runs on any opened PR
name: Conda Lock
on:
issue_comment:
types: [created]
jobs:
condalock:
# Only run on Pull Requests, when a comment with '/condalock' is made
if: github.event.issue.pull_request && startsWith(github.event.comment.body, '/condalock')
permissions:
contents: write # to git push added/changed files
pull-requests: write # for adding reactions to pull request comments
runs-on: ubuntu-latest
timeout-minutes: 15
defaults:
run:
shell: bash -l {0}
steps:
# Add an emoji reaction to comment to indicate the script is starting
- name: Add reaction
uses: peter-evans/create-or-update-comment@v3
with:
comment-id: ${{ github.event.comment.id }}
reactions: eyes
# Checkout the pull request branch
- name: Checkout Repository
uses: actions/checkout@v3
with:
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
ref: refs/pull/${{ github.event.issue.number }}/head
# Add an emoji reaction to comment to indicate that conda-lock is starting
- name: Add reaction
uses: peter-evans/create-or-update-comment@v3
with:
comment-id: ${{ github.event.comment.id }}
reactions: rocket
# Run conda-lock GitHub Action
- name: Run conda-lock
uses: weiji14/conda-lock-refresh@5525d3fd746de3709ac623e1895303e239baf6ed
with:
file: "environment.yml"
platform: "linux-64"
# Add an emoji reaction to comment to indicate the script completed successfully
- name: Add reaction
uses: peter-evans/create-or-update-comment@v3
with:
comment-id: ${{ github.event.comment.id }}
reactions: hooray