-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b319985
commit 93051a3
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |