Update Combine Data #63
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
on: | |
schedule: | |
# runs daily between March 3 and 10th automatically and otherwise on-demand. | |
- cron: '0 12,17 3-12 3 *' | |
workflow_dispatch: | |
name: Update Combine Data | |
jobs: | |
update: | |
name: Update Combine Data | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- {os: ubuntu-latest, r: 'release'} | |
env: | |
GITHUB_PAT: ${{ secrets.NFLVERSE_GH_TOKEN }} | |
R_KEEP_PKG_SOURCE: yes | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: ${{ matrix.config.r }} | |
http-user-agent: ${{ matrix.config.http-user-agent }} | |
use-public-rspm: true | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
cache-version: 1 | |
extra-packages: | | |
nflverse/nflverse-data | |
ropensci/piggyback | |
- name: Update combine | |
run: Rscript -e 'source("auto/update_combine.R")' | |
- name: Commit and push updated data | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git pull | |
git add data | |
git commit -m "Automated combine data update `date`" || echo "No changes to commit" | |
git push || echo "No changes to commit" |