-
Notifications
You must be signed in to change notification settings - Fork 1
31 lines (31 loc) · 959 Bytes
/
fetch.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
name: Fetch the register
on:
workflow_dispatch:
schedule:
- cron: '0 1 1 * *' # 1AM every 1st of the month
jobs:
scrape:
name: Fetch the register
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
- run: pip3 install -r requirements.txt
- name: Fetch the aircrafts
run: python3 run.py
- name: Commit the data
uses: nick-invision/retry@v2
with:
timeout_seconds: 10
max_attempts: 5
command: |
git config --global user.name 'Pierre Mesure (Github Actions)'
git config --global user.email '[email protected]'
git config --global rebase.autoStash true
git pull --rebase
git add register.json register_light.json register.csv
git commit -am "Update the data"
git push