-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathfetch-and-ingest-gisaid-master.yml
More file actions
87 lines (80 loc) · 2.93 KB
/
fetch-and-ingest-gisaid-master.yml
File metadata and controls
87 lines (80 loc) · 2.93 KB
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
79
80
81
82
83
84
85
86
87
name: GISAID fetch and ingest
on:
# Manually triggered using `./vendored/trigger nextstrain/ncov-ingest gisaid/fetch-and-ingest`
repository_dispatch:
types:
- gisaid/fetch-and-ingest
- fetch-and-ingest
# Manually triggered using GitHub's UI
workflow_dispatch:
inputs:
trial_name:
description: >-
Short name for a trial run.
If provided, files will be uploaded to s3://nextstrain-ncov-private/trial/${TRIAL_NAME}/
and downstream ncov and forecasts-ncov workflows will not be triggered.
WARNING: without the trial name, workflow will upload files to s3://nextstrain-ncov-private/
required: false
fetch_from_database:
description: >-
Whether the workflow should fetch from upstream database.
If not selected (false), the workflow will start from existing data on S3.
type: boolean
required: false
default: true
image:
description: >-
Specific container image to use for build.
This will override the default image (nextstrain/ncov-ingest).
required: false
jobs:
set_config_overrides:
runs-on: ubuntu-latest
steps:
- id: config
name: Set config overrides
env:
TRIAL_NAME: ${{ inputs.trial_name }}
FETCH_FROM_DATABASE: ${{ github.event_name != 'workflow_dispatch' && true || inputs.fetch_from_database }}
run: |
config="--config"
config+=" trigger_rebuild=False"
config+=" trigger_counts=False"
if [[ "$FETCH_FROM_DATABASE" == true ]]; then
config+=" fetch_from_database=True"
else
config+=" fetch_from_database=False"
fi
if [[ "$TRIAL_NAME" ]]; then
config+=" s3_dst=s3://nextstrain-ncov-private/trial/${TRIAL_NAME}"
fi
echo "config=$config" >> "$GITHUB_OUTPUT"
outputs:
config_overrides: ${{ steps.config.outputs.config }}
fetch_and_ingest:
needs: [set_config_overrides]
permissions:
id-token: write
uses: nextstrain/.github/.github/workflows/pathogen-repo-build.yaml@master
secrets: inherit
with:
runtime: aws-batch
env: |
CONFIG_OVERRIDES: ${{ needs.set_config_overrides.outputs.config_overrides }}
GITHUB_RUN_ID: ${{ github.run_id }}
NEXTSTRAIN_DOCKER_IMAGE: ${{ inputs.image || 'nextstrain/ncov-ingest' }}
SLACK_CHANNELS: ${{ inputs.trial_name && vars.TEST_SLACK_CHANNEL || vars.NCOV_GISAID_SLACK_CHANNEL }}
run: |
nextstrain build \
--aws-batch \
--detach \
--no-download \
--cpus 48 \
--memory 90GiB \
--env GITHUB_RUN_ID \
--env SLACK_TOKEN \
--env SLACK_CHANNELS \
--env PAT_GITHUB_DISPATCH="$GH_TOKEN_NEXTSTRAIN_BOT_WORKFLOW_DISPATCH" \
. \
--configfile config/gisaid.yaml \
$CONFIG_OVERRIDES