From 267e72d19ea6d0b7418941901e12bf3c3c72b637 Mon Sep 17 00:00:00 2001 From: Jover Lee Date: Thu, 18 Apr 2024 15:08:48 -0700 Subject: [PATCH] phylogenetic.yaml: Simplify config override logic Co-authored-by: Victor Lin <13424970+victorlin@users.noreply.github.com> --- .github/workflows/phylogenetic.yaml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/phylogenetic.yaml b/.github/workflows/phylogenetic.yaml index 857b021..04901b7 100644 --- a/.github/workflows/phylogenetic.yaml +++ b/.github/workflows/phylogenetic.yaml @@ -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"