-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (36 loc) · 992 Bytes
/
main.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
on:
schedule:
# Every day at 8 PM AEST
- cron: '0 10 * * *'
# allow manual workflow trigger
workflow_dispatch:
# required to push back to GitHub
permissions:
contents: write
jobs:
update_data:
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v3.3.0
- name: setup python
uses: actions/setup-python@v4.5.0
with:
python-version: '>=3.10'
cache: pip
- name: install requirements
run: |
pip install -r requirements.txt
- name: get data
run: |
python get_data.py
- name: push data back to repository
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git add .
# Only push if the return value of git commit is success (0).
if git commit -m "Update data";
then
git push
fi