Obtain latest stc-judgments data #51
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
name: Obtain latest stc-judgments data | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '41 15 * * *' # 3.41AM GMT+8 | |
jobs: | |
sc: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out this repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.PAT }} | |
- name: Setup Babashka | |
uses: turtlequeue/setup-babashka@v1.5.2 | |
with: | |
babashka-version: 1.3.188 | |
- name: Fetch latest data | |
run: bb --main input.judgments.stc-judgments | |
- name: Commit and push if it changed | |
run: |- | |
git config user.name "Automated update" | |
git config user.email "actions@users.noreply.github.com" | |
git add -A | |
timestamp=$(TZ='Asia/Singapore' date) | |
git commit -m "Latest stc-judgments data: ${timestamp}" || exit 0 | |
git pull --rebase | |
git push |