Skip to content

Run data collection #259

Run data collection

Run data collection #259

Workflow file for this run

name: Run data collection
on:
push:
paths:
- '.tracked_repos'
- '**.R'
- '.github/workflows/run_job.yaml'
schedule:
- cron: '59 23 * * 0'
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: Run Rscript
run: Rscript update.R
- name: Get Date
id: date
run: echo "::set-output name=date::$(TZ=UTC date +%Y-%m-%d_%H-%M-%S)"
- name: Get Branch
id: branch
run: echo "::set-output name=branch_name::${GITHUB_REF:11}"
- name: Commit new data
run: |
git add --all
git commit -m "New data collected at ${{ steps.date.outputs.date }}" || echo "No changes since last update"
- name: Push data
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ steps.branch.outputs.branch_name }}