diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7aae71c..f6aa2d7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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: | diff --git a/action.yml b/action.yml index fd535c8..c50202c 100644 --- a/action.yml +++ b/action.yml @@ -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 }}' \ @@ -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' }}