-
Notifications
You must be signed in to change notification settings - Fork 2
78 lines (70 loc) · 2.5 KB
/
run-models.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Run models
on:
repository_dispatch:
types:
- run-models
workflow_dispatch:
inputs:
slack_channel:
description: 'Slack channel to push update alerts. Default channel is nextstrain-counts-updates.'
required: false
trial_name:
description: 'Short name for a trial run that does not send Slack notifications. WARNING: without this we will overwrite files in s3://nextstrain-data/files/workflows/forecasts-ncov'
required: false
data_provenance:
description: 'Data provenance of data inputs for model: gisaid or open. Will run both if left empty.'
required: false
jobs:
set_config_overrides:
runs-on: ubuntu-latest
steps:
- id: s3_dst
run: |
S3_DST=s3://nextstrain-data/files/workflows/forecasts-ncov
if [[ -n "$TRIAL_NAME" ]]; then
S3_DST+=/trial/"$TRIAL_NAME"
fi
echo "s3_dst=$S3_DST" >> "$GITHUB_OUTPUT"
env:
TRIAL_NAME: ${{ inputs.trial_name }}
- id: data_provenances
run: |
DATA_PROVENANCES='["gisaid", "open"]'
if [[ -n "$INPUT_DATA_PROVENANCE" ]]; then
DATA_PROVENANCES="$INPUT_DATA_PROVENANCE"
fi
echo "data_provenances=$DATA_PROVENANCES" >> "$GITHUB_OUTPUT"
env:
INPUT_DATA_PROVENANCE: ${{ inputs.data_provenance }}
outputs:
s3_dst: ${{ steps.s3_dst.outputs.s3_dst }}
data_provenances: ${{ steps.data_provenances.outputs.data_provenances }}
run_models:
needs: [set_config_overrides]
permissions:
id-token: write
uses: nextstrain/.github/.github/workflows/pathogen-repo-build.yaml@master
secrets: inherit
with:
runtime: aws-batch
run: |
nextstrain build \
--aws-batch \
--detach \
--no-download \
--image nextstrain/base \
--cpus 8 \
--memory 16GiB \
--env AWS_DEFAULT_REGION \
--env GITHUB_RUN_ID \
--env SLACK_TOKEN \
--env SLACK_CHANNELS \
. \
--configfile config/config.yaml config/optional.yaml \
--config s3_dst="$S3_DST" data_provenances="$DATA_PROVENANCES" \
--keep-going
env: |
DATA_PROVENANCES: ${{ needs.set_config_overrides.outputs.data_provenances }}
GITHUB_RUN_ID: ${{ github.run_id }}
SLACK_CHANNELS: ${{ github.event.inputs.slack_channel || vars.SLACK_CHANNELS }}
S3_DST: ${{ needs.set_config_overrides.outputs.s3_dst }}