Skip to content

Commit

Permalink
phylogenetic.yaml: Simplify config override logic
Browse files Browse the repository at this point in the history
Co-authored-by: Victor Lin <[email protected]>
  • Loading branch information
joverlee521 and victorlin committed Apr 18, 2024
1 parent 779af70 commit 267e72d
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/phylogenetic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,21 @@ jobs:
METADATA_URL: ${{ inputs.metadata_url }}
run: |
config=""
if [[ "$TRIAL_NAME" || "$SEQUENCES_URL" || "$METADATA_URL" ]]; then
config+="--config"
if [[ "$TRIAL_NAME" ]]; then
config+=" deploy_url='s3://nextstrain-staging/zika_trials_"$TRIAL_NAME"_'"
fi
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 [[ "$SEQUENCES_URL" ]]; then
config+=" sequences_url='"$SEQUENCES_URL"'"
fi
if [[ "$METADATA_URL" ]]; then
config+=" metadata_url='"$METADATA_URL"'"
fi
if [[ "$METADATA_URL" ]]; then
config+=" metadata_url='"$METADATA_URL"'"
fi
if [[ $config ]]; then
config="--config $config"
fi
echo "config=$config" >> "$GITHUB_OUTPUT"
Expand Down

0 comments on commit 267e72d

Please sign in to comment.