-
Notifications
You must be signed in to change notification settings - Fork 825
38 lines (33 loc) · 1.01 KB
/
backup.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
name: backup
on:
workflow_dispatch:
push:
branches:
- master
paths:
- "xiaoyahelper/**"
- ".github/workflows/backup.yml"
schedule:
- cron: '0 */12 * * *'
jobs:
xiaoyahelper:
runs-on: ubuntu-latest
name: xiaoyahelper
steps:
- name: Checkout
uses: actions/checkout@v4
- name: xiaoyahelper
run: |
mv ./xiaoyahelper/aliyun_clear.sh ./xiaoyahelper/aliyun_clear.sh.backup
wget -O ./xiaoyahelper/aliyun_clear.sh https://xiaoyahelper.zengge99.eu.org/aliyun_clear.sh
if [ -f ./xiaoyahelper/aliyun_clear.sh ]; then
rm -rf ./xiaoyahelper/aliyun_clear.sh.backup
else
mv ./xiaoyahelper/aliyun_clear.sh.backup ./xiaoyahelper/aliyun_clear.sh
fi
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'chore: backup xiaoyahelper'
branch: master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}