-
Notifications
You must be signed in to change notification settings - Fork 33
113 lines (107 loc) · 3.55 KB
/
Copy pathupload.yaml
File metadata and controls
113 lines (107 loc) · 3.55 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: Upload data from fauna to S3
# Only support manual trigger of this workflow.
on:
workflow_dispatch:
inputs:
triggerAvianFlu:
description: "Trigger nextstrain/avian-flu GenoFLU workflow"
type: boolean
required: true
triggerPublic:
description: "Trigger Nextstrain public builds"
required: true
type: boolean
publicDockerImage:
description: "Specific container image to use for Nextstrain public builds"
required: false
type: string
triggerNextfluPrivate:
description: "Trigger nextflu-private group builds"
required: true
type: boolean
nextfluPrivateDockerImage:
description: "Specific container image to use for nextflu-private group builds"
required: false
type: string
triggerForecastsFlu:
description: "Trigger forecasts-flu models"
required: true
type: boolean
forecastsFluDockerImage:
description: "Specific container image to use for forecasts-flu models"
required: false
type: string
concurrency:
group: ${{ github.workflow }}
# Only cancel in progress workflow if the workflow is running on the default branch
cancel-in-progress: ${{ github.ref_name == github.event.repository.default_branch }}
jobs:
ingest:
permissions:
id-token: write
uses: ./.github/workflows/ingest.yaml
with:
# Trigger avian flu in a separate job to prevent error from failing
# the rest of the upload workflow
triggerAvianFlu: false
artifact-name: build-outputs-ingest
secrets: inherit
trigger_avian_flu:
needs: [ingest]
continue-on-error: true
runs-on: ubuntu-latest
steps:
- if: ${{ inputs.triggerAvianFlu }}
name: Trigger avian-flu/genoflu-gisaid.yaml
run: |
gh workflow run \
genoflu-gisaid.yaml \
--repo nextstrain/avian-flu
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_NEXTSTRAIN_BOT_WORKFLOW_DISPATCH }}
upload_titers:
# Depends on ingest since titer should be checked against sequence strains
needs: [ingest]
permissions:
id-token: write
uses: nextstrain/.github/.github/workflows/pathogen-repo-build.yaml@master
secrets: inherit
with:
artifact-name: build-outputs-upload
runtime: docker
run: |
nextstrain build \
--env RETHINK_AUTH_KEY \
--env RETHINK_HOST \
. \
-j 4 \
upload_all_titers \
--configfile profiles/upload.yaml
trigger:
needs: [upload_titers]
strategy:
matrix:
include:
- trigger: ${{ inputs.triggerPublic }}
repo: seasonal-flu
workflow: run-public-builds.yaml
image: ${{ inputs.publicDockerImage }}
- trigger: ${{ inputs.triggerNextfluPrivate }}
repo: seasonal-flu
workflow: run-nextflu-private-builds.yaml
image: ${{ inputs.nextfluPrivateDockerImage }}
- trigger: ${{ inputs.triggerForecastsFlu }}
repo: forecasts-flu
workflow: run-models.yaml
image: ${{ inputs.forecastsFluDockerImage }}
runs-on: ubuntu-latest
steps:
- if: ${{ matrix.trigger }}
name: Trigger ${{ matrix.workflow }}
run: |
gh workflow run \
${{ matrix.workflow }} \
--repo nextstrain/${{ matrix.repo }} \
-f dockerImage=${{ matrix.image }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_NEXTSTRAIN_BOT_WORKFLOW_DISPATCH }}