Skip to content

Commit

Permalink
move check for containerize/run to top
Browse files Browse the repository at this point in the history
  • Loading branch information
tedil committed Dec 9, 2024
1 parent 2551a81 commit 786074d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ inputs:
runs:
using: 'composite'
steps:
- name: Validate inputs
if: ${{ ! (inputs.task == 'containerize' || inputs.task == 'run' )}}
shell: bash -el {0}
run: |
echo 'Invalid value for "task": "${{ inputs.task }}". Options: "containerize", "run".'
exit 1
- shell: bash -el {0}
run: sed 's/{{ snakemake_version }}/${{ inputs.snakemake-version }}/g' environment.yaml.template > environment.yaml
- name: Setup conda
Expand Down Expand Up @@ -65,9 +71,4 @@ runs:
if: ${{ inputs.task == 'containerize' }}
shell: bash -el {0}
run: snakemake --directory ${{ inputs.directory }} --snakefile ${{ inputs.snakefile }} --show-failed-logs ${{ inputs.args }} --containerize > Dockerfile
- if: ${{ ! (inputs.task == 'containerize' || inputs.task == 'run' )}}
shell: bash -el {0}
run: |
echo 'Invalid value for "task": "${{ inputs.task }}". Options: "containerize", "run".'
exit 1

0 comments on commit 786074d

Please sign in to comment.