From 779af70da183efeb9c29bd58dc9ce9a552cb6828 Mon Sep 17 00:00:00 2001 From: Jover Lee Date: Fri, 12 Apr 2024 15:01:24 -0700 Subject: [PATCH] phylogenetic GH Action: Add input URLs Allows customization of input sequences and metadata URLs. This will allow us to test trial outputs from ingest workflows. --- .github/workflows/phylogenetic.yaml | 31 +++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/.github/workflows/phylogenetic.yaml b/.github/workflows/phylogenetic.yaml index 2ff990e..857b021 100644 --- a/.github/workflows/phylogenetic.yaml +++ b/.github/workflows/phylogenetic.yaml @@ -30,6 +30,18 @@ on: If set, builds will be deployed to s3://nextstrain-staging/zika_trials__* required: false type: string + sequences_url: + description: | + URL for a sequences.fasta.zst file. + If not provided, will use default sequences_url from phylogenetic/defaults/config_zika.yaml + required: false + type: string + metadata_url: + description: | + URL for a metadata.tsv.zst file. + If not provided, will use default metadata_url from phylogenetic/defaults/config_zika.yaml + required: false + type: string jobs: set_config_overrides: @@ -39,11 +51,26 @@ jobs: name: Set config overrides env: TRIAL_NAME: ${{ inputs.trial_name }} + SEQUENCES_URL: ${{ inputs.sequences_url }} + METADATA_URL: ${{ inputs.metadata_url }} run: | config="" - if [[ "$TRIAL_NAME" ]]; then + if [[ "$TRIAL_NAME" || "$SEQUENCES_URL" || "$METADATA_URL" ]]; then + config+="--config" - config+=" deploy_url='s3://nextstrain-staging/zika_trials_"$TRIAL_NAME"_'" + + if [[ "$TRIAL_NAME" ]]; then + config+=" deploy_url='s3://nextstrain-staging/zika_trials_"$TRIAL_NAME"_'" + fi + + if [[ "$SEQUENCES_URL" ]]; then + config+=" sequences_url='"$SEQUENCES_URL"'" + fi + + if [[ "$METADATA_URL" ]]; then + config+=" metadata_url='"$METADATA_URL"'" + fi + fi echo "config=$config" >> "$GITHUB_OUTPUT"