Fetch and ingest (on branch) #23
Workflow file for this run
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: Fetch and ingest (on branch) | |
on: | |
# Manually triggered using GitHub's UI | |
workflow_dispatch: | |
inputs: | |
image: | |
description: 'Specific container image to use for build (will override the default of "nextstrain build")' | |
required: false | |
env: | |
NEXTSTRAIN_DOCKER_IMAGE: ${{ github.event.inputs.image }} | |
jobs: | |
fetch-and-ingest: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: nextstrain/.github/actions/setup-nextstrain-cli@master | |
with: | |
cli-version: ">=7.1.0" | |
python-version: "3.10" | |
- name: install-pyyaml | |
run: python3 -m pip install pyyaml | |
- name: run_pipeline | |
run: | | |
# Create JSON string for the nested upload config | |
GITHUB_BRANCH=${GITHUB_REF#refs/heads/} | |
S3_DST="s3://nextstrain-data/files/workflows/monkeypox/branch/${GITHUB_BRANCH}" | |
UPLOAD_CONFIG=$(jq -n --arg S3_DST "$S3_DST" '{"s3": {"dst": $S3_DST }}') | |
nextstrain build \ | |
--aws-batch \ | |
--detach \ | |
--no-download \ | |
--cpus 32 \ | |
--memory 64gib \ | |
--env AWS_DEFAULT_REGION \ | |
--env AWS_ACCESS_KEY_ID \ | |
--env AWS_SECRET_ACCESS_KEY \ | |
--env GITHUB_RUN_ID \ | |
ingest \ | |
--configfiles config/config.yaml config/optional.yaml \ | |
--config trigger_rebuild=False send_slack_notifications=False upload="$UPLOAD_CONFIG" | |
env: | |
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
GITHUB_RUN_ID: ${{ github.run_id }} |