Skip to content

Update evidence pack #22

Update evidence pack

Update evidence pack #22

name: Update evidence pack
on:
schedule:
- cron: "15 6 1 * *"
workflow_dispatch:
inputs:
force_refresh:
description: 'Force re-download of all cached evidence sources'
type: boolean
default: false
permissions:
contents: write
pull-requests: write
concurrency:
group: update-evidence-pack
cancel-in-progress: false
jobs:
update-evidence-pack:
name: Update evidence pack
runs-on: ubuntu-latest
environment: Evidence Packs
env:
GWAS_ASSOCIATIONS_URL: ${{ vars.GWAS_ASSOCIATIONS_URL }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set cache month
run: echo "CACHE_MONTH=$(date +'%Y-%m')" >> "$GITHUB_ENV"
- name: Cache Bun packages
uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: bun-install-${{ runner.os }}-${{ hashFiles('bun.lock') }}
restore-keys: |
bun-install-${{ runner.os }}-
- name: Cache evidence sources
uses: actions/cache@v4
with:
path: |
.evidence-cache/clinvar
.evidence-cache/gwas
.evidence-cache/snpedia
.evidence-cache/pharmgkb
.evidence-cache/clingen
key: evidence-sources-${{ runner.os }}-${{ env.CACHE_MONTH }}
restore-keys: |
evidence-sources-${{ runner.os }}-
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install variant tools
run: |
sudo apt-get update
sudo apt-get install -y bcftools tabix
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Update evidence pack
run: |
FORCE="${{ inputs.force_refresh && '--force' || '' }}"
bun run scripts/syncEvidenceSources.ts $FORCE
bun run scripts/syncCpic.ts $FORCE
bun run scripts/syncSnpedia.ts $FORCE
bun run scripts/syncDbsnp.ts $FORCE
bun run scripts/syncPharmgkb.ts $FORCE
bun run scripts/importClinGen.ts $FORCE
bun run scripts/buildEvidencePack.ts
- name: Check evidence pack
run: bun run evidence:check
- name: Run tests
run: bun run test
env:
NODE_OPTIONS: --max-old-space-size=6144
- name: Build
run: bun run build
env:
NODE_OPTIONS: --max-old-space-size=6144
- name: Open pull request
uses: peter-evans/create-pull-request@v6
with:
branch: automation/update-evidence-pack
delete-branch: true
title: Update monthly evidence pack
commit-message: Update monthly evidence pack
body: |
## Summary
- Syncs public evidence source caches.
- Syncs SNPedia-derived supplementary evidence.
- Syncs GRCh37 and GRCh38 dbSNP references for local VCF annotation.
- Rebuilds the sharded static evidence pack.
- Updates evidence-pack manifests, shard and annotation checksums, and app pack-version constants when needed.
GWAS sync uses the repository `GWAS_ASSOCIATIONS_URL` variable when it is configured. If the variable is empty, the GWAS source sync step is skipped by the evidence tooling.
## Checks
- `bun run evidence:update:monthly`
- `bun run evidence:check`
- `bun run test`
- `bun run build`