Upload data from fauna to S3 #253
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }} |