forked from manuelvgsm/e5-renew
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.41 KB
/
E5-Rclone-Actions-Repo.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
41
42
43
44
45
46
47
48
49
50
name: E5-Rclone-Actions-Repo
on:
push:
branches:
- main
schedule:
- cron: 30 13 * * *
watch:
types: started
jobs:
run-it:
runs-on: ubuntu-latest
name: zip
steps:
- name: Checkout codes
uses: actions/checkout@v2
- name: Install rclone #安装rclone
run: curl https://rclone.org/install.sh | sudo bash
- name: Unzip config #解压配置文件
run: |
mkdir -p ~/.config/rclone/
unzip -P ${{ secrets.PASSWD }} rclone.zip -d ~/.config/rclone/
- name: Run rclone #运行rclone
run: |
# 更改时区
sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
# 列出文件(此处不展示)
echo "列出文件(此处不展示)"
rclone lsd e5:/ > "lsd.log"
rclone mkdir e5:/E5-Rclone-Actions-Repo/
rclone move lsd.log e5:/E5-Rclone-Actions-Repo/
rclone delete e5:/E5-Rclone-Actions-Repo/lsd.log
rclone rmdir e5:/E5-Rclone-Actions-Repo/
- name: Zip config #打包配置文件
run: zip -P ${{ secrets.PASSWD }} rclone.zip -j ~/.config/rclone/rclone.conf
- name: Commit config #提交配置文件
run: |
git config --global user.email "null@null.null"
git config --global user.name "null"
git add .
git commit -am "Auto update rclone config"
git push