-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1.14 KB
/
update_ngs.yaml
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
on:
schedule:
# runs every day at 7:00 AM UTC = 3AM ET in jan, feb, sep-dec
- cron: '0 7 * 1,2,9-12 *'
workflow_dispatch:
inputs:
full_rebuild:
description: 'Full Rebuild'
required: true
default: false
type: boolean
name: update_ngs
jobs:
update:
name: update data
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.NFLVERSE_GH_TOKEN }}
NFLVERSE_REBUILD: ${{ inputs.full_rebuild }}
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 2
extra-packages: |
nflverse/nflverse-data
ropensci/piggyback
- name: Run ngs update script
run: Rscript -e 'source("R/update_ngs.R")'
- name: Commit results
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git pull
git add data
git commit -m "NGS data updated `date`" || echo "No changes to commit"
git push origin main || echo "No changes to commit"