Upload data from fauna to S3 #37
This file contains 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: | |
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 | |
triggerPrivateNextflu: | |
description: "Trigger private Nextflu builds" | |
required: true | |
type: boolean | |
privateNextfluDockerImage: | |
description: "Specific container image to use for private Nextflu builds" | |
required: false | |
type: string | |
jobs: | |
upload: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Install Nextstrain CLI, so we can run the flu workflow. | |
- uses: nextstrain/.github/actions/setup-nextstrain-cli@master | |
# Run the flu workflow that downloads titers and sequences from fauna and | |
# uploads to S3. | |
- name: Download from fauna and upload to S3 | |
run: | | |
set -x | |
nextstrain build \ | |
--docker \ | |
. \ | |
-j 4 \ | |
upload_all_titers \ | |
upload_all_raw_sequences \ | |
upload_all_sequences \ | |
upload_all_metadata \ | |
--configfile profiles/upload.yaml | |
env: | |
RETHINK_HOST: ${{ secrets.RETHINK_HOST }} | |
RETHINK_AUTH_KEY: ${{ secrets.RETHINK_AUTH_KEY }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
trigger-public-builds: | |
needs: [upload] | |
if: ${{ inputs.triggerPublic }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Trigger Nextstrain public builds | |
run: | | |
gh workflow run \ | |
run-public-builds.yaml \ | |
--repo nextstrain/seasonal-flu \ | |
-f dockerImage=${{ github.event.inputs.publicDockerImage }} | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
trigger-private-nextflu-builds: | |
needs: [upload] | |
if: ${{ inputs.triggerPrivateNextflu }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Trigger private Nextflu builds | |
run: | | |
gh workflow run \ | |
run-private-nextflu-builds.yaml \ | |
--repo nextstrain/seasonal-flu \ | |
-f dockerImage=${{ github.event.inputs.privateNextfluDockerImage }} | |
env: | |
GITHUB_TOKEN: ${{ github.token }} |