Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

Add pre-run script as an option for the Tower CLI #6

Merged
merged 3 commits into from
Nov 30, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# nf-core/tower-action: Changelog

## [[v2.1](https://github.com/nf-core/tower-action/releases/tag/v2.1)] - 2021-11-30

Add option to pass pre-run script to Tower CLI.

## [[v2.0](https://github.com/nf-core/tower-action/releases/tag/v2.0)] - 2021-11-19

A complete rewrite of the action to use the new [Nextflow Tower CLI](https://github.com/seqeralabs/tower-cli)
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ These should be supplied as a valid JSON object, quoted as a string in your GitH

Pipeline config profiles to use. Should be comma separated without spaces.

### `pre_run_script`

**[Optional]** Pre-run script before launch.

Pre-run script executed before pipeline launch.

## Credits

This GitHub Action was written by Phil Ewels ([@ewels](https://github.com/ewels)), with help from and based on earlier work by Gisela Gabernet ([@ggabernet](https://github.com/ggabernet)).
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ inputs:
profiles:
description: Nextflow config profiles
required: false
pre_run_script:
description: Pre-run script before launch
required: false

runs:
using: 'docker'
Expand All @@ -52,3 +55,4 @@ runs:
WORKDIR: ${{ inputs.workdir }}
PARAMETERS: ${{ toJson(fromJson(inputs.parameters)) }}
CONFIG_PROFILES: ${{ inputs.profiles }}
PRE_RUN_SCRIPT: ${{ inputs.pre_run_script }}
3 changes: 2 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ tw launch $PIPELINE \
${WORKDIR:+"--work-dir=$WORKDIR"} \
${TOWER_COMPUTE_ENV:+"--compute-env=$TOWER_COMPUTE_ENV"} \
${REVISION:+"--revision=$REVISION"} \
${CONFIG_PROFILES:+"--profile=$CONFIG_PROFILES"}
${CONFIG_PROFILES:+"--profile=$CONFIG_PROFILES"} \
${PRE_RUN_SCRIPT:+"--pre-run=$PRE_RUN_SCRIPT"}