Skip to content

Commit

Permalink
phylogenetic GH Action: Add input URLs
Browse files Browse the repository at this point in the history
Allows customization of input sequences and metadata URLs.
This will allow us to test trial outputs from ingest workflows.
  • Loading branch information
joverlee521 committed Apr 12, 2024
1 parent 27c6557 commit 779af70
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions .github/workflows/phylogenetic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ on:
If set, builds will be deployed to s3://nextstrain-staging/zika_trials_<trial_name>_*
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:
Expand All @@ -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"
Expand Down

0 comments on commit 779af70

Please sign in to comment.