Skip to content

Run data collection #66

Run data collection

Run data collection #66

Workflow file for this run

name: Run data collection
on:
push:
paths:
- '.tracked_repos'
- '**.R'
- '.github/workflows/run_job.yaml'
schedule:
# beware the ides
- cron: '0 0 15 * *'
jobs:
data-collection:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: r-lib/actions/setup-r@v2
- name: Set GIT
run: |
git config --global user.email "action@github.com"
git config --global user.name "Github Action"
- name: System & package dependencies
run: |
sudo apt-get update
sudo apt-get install libcurl4-openssl-dev
Rscript -e "install.packages('xml2')"
- name: Run Rscript
run: Rscript update_archives.R
- name: Get Date
id: date
run: echo "::set-output name=date::$(TZ=UTC date +%Y-%m-%d_%H-%M-%S)"
- name: Commit new data
run: |
git add --all
git commit -m "New data collected at ${{ steps.date.outputs.date }}" || echo "No updates to archive since last run"
- name: Push data
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: 'master'