Skip to content

Obtain latest LSS DT reports #186

Obtain latest LSS DT reports

Obtain latest LSS DT reports #186

Workflow file for this run

name: Obtain latest LSS DT reports
on:
workflow_dispatch:
schedule:
- cron: '31 15 * * 2,4,6' # 11.31PM GMT+8 every Tues, Thurs, and Sat
jobs:
lss-dt-reports:
runs-on: ubuntu-latest
steps:
- name: Check out this repo
uses: actions/checkout@v4.1.6
with:
fetch-depth: 0
token: ${{ secrets.PAT }}
- uses: actions/setup-python@v4
with:
python-version: '3.12'
- uses: abatilo/actions-poetry@v2
with:
poetry-version: '1.2.2'
- name: Install dependencies
run: poetry install --no-interaction --no-root
- name: Setup Babashka
uses: turtlequeue/setup-babashka@v1.6.0
with:
babashka-version: 1.3.190
- name: Install pdftotext
run: |-
sudo apt-get update && \
sudo apt-get install -y \
poppler-utils \
tesseract-ocr \
ghostscript
- name: Fetch latest data
run: bb --main input.lss.dt-reports
- 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 LSS DT reports data: ${timestamp}" || exit 0
git pull --rebase
git push