Skip to content

Commit

Permalink
fix: bug in action
Browse files Browse the repository at this point in the history
  • Loading branch information
beckermr committed Sep 2, 2024
1 parent 76b2ac2 commit 3c46b0e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,20 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v3
with:
python-version: 3.11
channels: conda-forge
channel-priority: strict
show-channel-urls: true
miniforge-version: latest

- name: make the lock file
shell: bash -leo pipefail {0}
run: |
conda install --yes conda-lock
conda-lock lock --file test-env.yml --lockfile conda-lockk.yml
- name: make a copy of lock file
shell: bash -leo pipefail {0}
run: |
Expand Down
13 changes: 6 additions & 7 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ runs:
if: inputs.action == 'pr'
shell: bash -leo pipefail {0}
run: |
if [[ "${INPUT_ACTION}" != "pr" ]]; then
echo "skip=false" >> "$GITHUB_OUTPUT"
exit 0
fi
prs=$(gh pr list \
--repo "$GITHUB_REPOSITORY" \
--head '${{ inputs.head-branch }}' \
Expand All @@ -85,13 +90,7 @@ runs:
env:
GH_TOKEN: ${{ inputs.github-token }}
SKIP_IF_PR_EXISTS: ${{ inputs.skip-if-pr-exists }}

- name: do not skip for non-PR actions
id: check
if: inputs.action != 'pr'
shell: bash -leo pipefail {0}
run: |
echo "skip=false" >> "$GITHUB_OUTPUT"
INPUT_ACTION: ${{ inputs.action }}

- name: setup conda-lock
if: ${{ steps.check.outputs.skip != 'true' }}
Expand Down

0 comments on commit 3c46b0e

Please sign in to comment.