-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (31 loc) · 916 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
33
name: Backup Djeva
on:
workflow_dispatch:
schedule:
- cron: "0 14 * * 1-5"
jobs:
start_run:
runs-on: ubuntu-latest
steps:
- name: Checkout Codes
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v1
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Start Backup
run: python main.py
- name: Update Djeva
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
if [ -n "$(git status --porcelain)" ]; then
git add .
git commit -m "update Djeva $(date +'%B %d, %Y %T (%Z)')"
git push origin $(git branch --show-current)
else
echo "Oops, seems push failed!"
exit 1
fi