Skip to content

Store International and Cups match results #358

Store International and Cups match results

Store International and Cups match results #358

name: Store International and Cups match results
# Controls when the action will run - have set this to run at:
# 02:00 on Tuesday, Thursday, and Sunday in
# January, February, March, April, May, August, September, October, November, and December.
on:
schedule:
- cron: "0 17 * * 0,2,4"
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
update-match-results:
# The type of runner that the job will run on
runs-on: macOS-latest
# retrieve token
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
- name: Package Installation
run: Rscript -e 'install.packages(c("tidyverse" ,"devtools", "dplyr", "stringr", "here", "lubridate", "janitor", "piggyback"))'
- name: worldfootballR Package Installation
run: Rscript -e 'devtools::install_github("JaseZiv/worldfootballR")'
- name: Update cup match results
run: Rscript -e 'source(here::here("R", "fb_match_results_cups", "update_fb_cups_match_results.R"), echo = TRUE)'
- name: Commit
run: |
git config --global user.name 'JaseZiv'
git config --global user.email '[email protected]'
git add .
git commit -m 'updating data' || echo "No changes to commit"
git push || echo "No changes to commit"