Skip to content

status-update

status-update #3189

Workflow file for this run

on:
push:
paths:
- '**.Rmd'
- '.github/workflows/*'
workflow_dispatch:
schedule:
# daily in the morning for America/New_York (hours in UTC)
- cron: '0 12 * * *'
repository_dispatch:
# for use with peter-evans/repository_dispatch@v1
types: ['status-update']
name: Render Status
jobs:
render:
name: Render Status
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2 # This is important to set for `git diff-tree` to work below
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r-dependencies@v2
- name: Render Status Page
run: Rscript .github/render.R
- name: Config git
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
- name: Commit status update
if: github.event_name != 'repository_dispatch'
run: |
git commit --all -m "[status] $(date +'%F %T %Z')" || echo "No changes to commit"
git push origin || echo "No changes to commit"
- name: Commit dispatched status update
if: github.event_name == 'repository_dispatch'
run: |
git commit --all -m "[status] ${{ github.event.client_payload.repo }}$(date +'%F %T %Z')" || echo "No changes to commit"
git push origin || echo "No changes to commit"