Skip to content

Commit

Permalink
Check conda-lock.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
reyery committed Jan 23, 2024
1 parent e10aaac commit a0fb134
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/pull.request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,26 @@ jobs:
run: |
set +e
git diff --quiet ..master -- environment.yml
echo "diff=$?" >> "$GITHUB_OUTPUT"
echo "env_diff=$?" >> "$GITHUB_OUTPUT"
- name: Check conda-lock.yml diff
id: conda_lock_yml_diff
run: |
set +e
git diff --quiet ..master -- conda-lock.yml
echo "lock_diff=$?" >> "$GITHUB_OUTPUT"
- uses: actions/github-script@v7
if: ${{ steps.environment_yml_diff.outputs.diff != 0 }}
if: ${{ steps.environment_yml_diff.outputs.env_diff != 0 && steps.conda_lock_yml_diff.outputs.lock_diff == 0 }}
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: ${{ format('@{0} Changes detected in `environment.yml`.', github.event.pull_request.user.login) }}
body: 'Changes detected in `environment.yml` but `conda-lock.yml` is not updated.'
})
core.setFailed('conda-lock.yml needs to be updated')
build:
name: ${{ matrix.os }}
Expand Down

0 comments on commit a0fb134

Please sign in to comment.