Skip to content

Commit

Permalink
Check environment-file and pip-install-target inputs
Browse files Browse the repository at this point in the history
These are marked as optional in the inputs block. There was an implicit
assumption that it's required to have one of the inputs but not both.
This can't be encoded in the inputs block so check the values as the
very first step.
  • Loading branch information
victorlin committed Oct 16, 2024
1 parent 5571465 commit 937af63
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/docs-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,17 @@ jobs:
run:
shell: bash -l {0}
steps:
- name: Check inputs
if: (inputs.environment-file == '' && inputs.pip-install-target == '') ||
(inputs.environment-file != '' && inputs.pip-install-target != '')
run: |
cat <<~~
This workflow requires one (and only one) of the following inputs:
- environment-file
- pip-install-target
~~
exit 1
- uses: actions/checkout@v4
with:
repository: ${{ inputs.repo }}
Expand Down

0 comments on commit 937af63

Please sign in to comment.