-
Notifications
You must be signed in to change notification settings - Fork 13
44 lines (39 loc) · 1.52 KB
/
lineage_update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Get new lineages from pango
on:
schedule:
- cron: '0 0,6,12,18 * * *'
jobs:
scheduled_check:
runs-on: ubuntu-20.04
defaults:
run:
shell: bash
working-directory: curated_reports_prep
steps:
- name: Checkout
uses: actions/checkout@main
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install python dependencies
run: python -m pip install --upgrade pip pandas
- name: process data
run: |
echo "starting update"
python lineages_hierarchy.py
python generate_curated_lineages_json.py
echo "removing log file"
rm curated_lineages_json.log
- name: commit if output is different
run: |
echo "running git diff, committing if different"
if [[($(git status ../web/src/assets/genomics/curated_lineages.json --porcelain | wc -c) -ne 0)]]; then
echo "changes were made, adding new lineage info"
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git add ../web/src/assets/genomics/curated_lineages.json
git add lineages.yml
git commit -m "updating lineage metadata"
git push origin master
else
echo "no changes were made, doing nothing."
fi;