Skip to content

Get covid clade counts and upload them to the AWS S3 bucket #11

Get covid clade counts and upload them to the AWS S3 bucket

Get covid clade counts and upload them to the AWS S3 bucket #11

name: Get covid clade counts and upload them to the AWS S3 bucket
on:
schedule:
- cron: "37 04 * * 1" # 4:37 AM UTC every Mon
workflow_dispatch:
env:
# Hubverse AWS account number
AWS_ACCOUNT: 312560106906
permissions:
contents: read
# id-token write required for AWS auth
id-token: write
jobs:
get-covid-clade-counts:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure AWS credentials
# request credentials to assume the hub's AWS role via OpenID Connect
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::312560106906:role/covid-clade-counts-action
aws-region: us-east-1
- name: Install uv 🐍
uses: astral-sh/setup-uv@v2
with:
version: "0.4.9"
enable-cache: true
- name: Get covid clade counts
run: |
uv run get_covid_clade_counts.py --as-of=$(date +'%Y-%m-%d')
- name: Install rclone
run: |
curl https://rclone.org/install.sh | sudo bash
rclone version
- name: Copy to cloud storage
# copy the created file to S3
run: |
rclone copy ./data/ ":s3,provider=AWS,env_auth:covid-clade-counts" \
--checksum --verbose --stats-one-line --config=/dev/null
shell: bash