Skip to content

Fetch and ingest

Fetch and ingest #1593

name: Fetch and ingest
on:
schedule:
# Note times are in UTC, which is 1 or 2 hours behind CET depending on daylight savings.
#
# Note the actual runs might be late.
# Numerous people were confused, about that, including me:
# - https://g.nite07.orgmunity/t/scheduled-action-running-consistently-late/138025/11
# - https://github.com/github/docs/issues/3059
#
# Note, '*' is a special character in YAML, so you have to quote this string.
#
# Docs:
# - https://docs.github.com/en/actions/learn-github-actions/events-that-trigger-workflows#schedule
#
# Tool that deciphers this particular format of crontab string:
# - https://crontab.guru/
#
# Runs at 4pm UTC (12pm EDT) since curation by NCBI happens on the East Coast.
- cron: '0 16 * * *'
repository_dispatch:
types:
- fetch-and-ingest
# 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
env:
GITHUB_RUN_ID: ${{ github.run_id }}
SLACK_CHANNELS: monkeypox-updates
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: nextstrain/.github/actions/setup-nextstrain-cli@master
with:
python-version: "3.10"
- name: run_pipeline
run: |
./bin/write-envdir ingest/env.d \
AWS_DEFAULT_REGION \
GITHUB_RUN_ID \
SLACK_TOKEN \
SLACK_CHANNELS \
PAT_GITHUB_DISPATCH
nextstrain build \
--aws-batch \
--detach \
--no-download \
--exec env \
--cpus 32 \
--memory 64gib \
ingest \
envdir env.d snakemake \
--configfiles config/config.yaml config/optional.yaml \
--cores 32 \
--printshellcmds
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 }}
PAT_GITHUB_DISPATCH: ${{ secrets.GH_TOKEN_NEXTSTRAIN_BOT_WORKFLOW_DISPATCH }}
- name: notify_pipeline_failed
if: ${{ failure() }}
run: ./ingest/bin/notify-on-job-fail