Skip to content

Commit

Permalink
adds auto-updating
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuailevy committed May 21, 2024
1 parent b319985 commit 93051a3
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/pull_data.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This workflow will install pytest, and test validity of data in repo.

name: Data integration

on:
push:
branches: [ "main" ]
schedule:
- cron: '0 0 * * *'

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.NICD_TOKEN }}

- name: Checkout private tools
uses: actions/checkout@v3
with:
repository: NICD-Wastewater-Genomics/NICD-Freyja-outputs-
token: ${{ secrets.NICD_TOKEN }}
path: NICD-Freyja-outputs-

- name: Clone
shell: bash -l {0}
run: |
git config --global user.name "joshuailevy"
git config --global user.email "joshua.levy16@gmail.com"
cp NICD-Freyja-outputs-/scripts/NICD_daily_smoothed.csv Dashboard/data/
cp NICD-Freyja-outputs-/scripts/NICD_monthly.csv Dashboard/data/
cp NICD-Freyja-outputs-/scripts/color_map.json Dashboard/data/
cp NICD-Freyja-outputs-/scripts/merged_data.tsv Dashboard/data/
- name: Push
run: |
if [[($(git status Dashboard/data/merged_data.tsv --porcelain | wc -c) -ne 0)]]; then
git add --all
git commit -m "automated core data update"
git push origin main
else
echo "no new samples, nothing to do"
fi

0 comments on commit 93051a3

Please sign in to comment.