-
-
Notifications
You must be signed in to change notification settings - Fork 4
32 lines (30 loc) · 843 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
32
name: Fetch latest data
on:
push:
workflow_dispatch:
schedule:
- cron: '51 3 * * *' # Once a day
jobs:
fetch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Fetch
run: ./fetch.sh
- name: Commit and push
run: |-
git config user.name "Automated"
git config user.email "[email protected]"
git add -A
timestamp=$(date -u)
git commit -m "${timestamp}" || exit 0
echo '### Changed files' >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
git show --name-only --format=tformat: >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
git pull --rebase
git push