-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (32 loc) · 1008 Bytes
/
update-data.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
name: Scrap latest data from pollen.lu and commit changes
on:
schedule:
- cron: '0 * * * *' # every hour
jobs:
update-data:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20.5
- name: NPM install
run: npm ci
- name: Scrap latest data from pollen.lu
run: npm run scrap-latest-data
- name: Check if there are any changes
id: verify_diff
run: |
git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT
- name: Commit updated data
if: steps.verify_diff.outputs.changed == 'true'
run: |
git config --global user.name 'Pollen.lu scrapper'
git config --global user.email '[email protected]'
git add .
git commit -am "Update pollen.lu data"
git push