Skip to content

Commit 343a9b2

Browse files
authored
.github/nextstrain-open: Add trial_name input
Support trials builds that deploy to staging.
1 parent 7788098 commit 343a9b2

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

.github/workflows/run-nextstrain-open-builds.yaml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ on:
2525
description: "Specific container image to use for build (will override the default of `nextstrain build`)"
2626
required: false
2727
type: string
28+
trial_name:
29+
description: |
30+
Trial name for deploying builds.
31+
If not set, builds will overwrite existing builds at s3://nextstrain-data/seasonal-flu_open*
32+
If set, builds will be deployed to s3://nextstrain-staging/seasonal-flu_trials_<trial_name>_*
33+
required: false
34+
type: string
35+
2836

2937
jobs:
3038
check-new-data:
@@ -94,8 +102,16 @@ jobs:
94102
runtime: docker
95103
env: |
96104
NEXTSTRAIN_DOCKER_IMAGE: ${{ inputs.dockerImage }}
105+
TRIAL_NAME: ${{ inputs.trial_name }}
97106
run: |
107+
declare -a config
108+
109+
if [[ "$TRIAL_NAME" ]]; then
110+
config+=("deploy_url=s3://nextstrain-staging/seasonal-flu_trials_${TRIAL_NAME}_")
111+
fi
112+
98113
nextstrain build \
99114
. \
100115
deploy_all \
101-
--configfile profiles/nextstrain-open.yaml
116+
--configfile profiles/nextstrain-open.yaml \
117+
--config "${config[@]}"

0 commit comments

Comments
 (0)