Skip to content

Commit 786074d

Browse files
committed
move check for containerize/run to top
1 parent 2551a81 commit 786074d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

action.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ inputs:
3838
runs:
3939
using: 'composite'
4040
steps:
41+
- name: Validate inputs
42+
if: ${{ ! (inputs.task == 'containerize' || inputs.task == 'run' )}}
43+
shell: bash -el {0}
44+
run: |
45+
echo 'Invalid value for "task": "${{ inputs.task }}". Options: "containerize", "run".'
46+
exit 1
4147
- shell: bash -el {0}
4248
run: sed 's/{{ snakemake_version }}/${{ inputs.snakemake-version }}/g' environment.yaml.template > environment.yaml
4349
- name: Setup conda
@@ -65,9 +71,4 @@ runs:
6571
if: ${{ inputs.task == 'containerize' }}
6672
shell: bash -el {0}
6773
run: snakemake --directory ${{ inputs.directory }} --snakefile ${{ inputs.snakefile }} --show-failed-logs ${{ inputs.args }} --containerize > Dockerfile
68-
- if: ${{ ! (inputs.task == 'containerize' || inputs.task == 'run' )}}
69-
shell: bash -el {0}
70-
run: |
71-
echo 'Invalid value for "task": "${{ inputs.task }}". Options: "containerize", "run".'
72-
exit 1
7374

0 commit comments

Comments
 (0)