-
Notifications
You must be signed in to change notification settings - Fork 4
46 lines (44 loc) · 1.29 KB
/
telco-fbo.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Obtain latest telco-fbo data
on:
workflow_dispatch:
schedule:
- cron: '12 20 * * 0,1,3,5' # 2.12AM GMT+8 every Sunday, Monday, Wednesday, and Friday
jobs:
telco-fbo:
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.telco.fbo
- 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 telco-fbo data: ${timestamp}" || exit 0
git pull --rebase
git push