-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (48 loc) · 1.58 KB
/
test.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
51
52
name: Test
# 触发条件
on:
workflow_dispatch:
#schedule:
# - cron: '*/5 * * * *'
# 表达式生成 https://crontab.guru/
#- cron: '11 3,9,15,21 * * *'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: 迁出代码
uses: actions/checkout@v2
- name: 安装Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: 加载缓存
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/run_in_Actions/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: 设置时区
run: sudo timedatectl set-timezone 'Asia/Shanghai'
- name: 执行任务
run: |
wget -O dev.zip https://github.com/alanbobs999/TopFreeProxies/archive/refs/heads/enhance/rr.zip
unzip dev.zip -d ./
cd ./TopFreeProxies-enhance-rr
pip install -r ./utils/requirements.txt
sudo sh ./utils/scripts/set_proxy.sh
chmod +x ./utils/subconverter/subconverter-linux-amd64 && chmod +x ./utils/litespeedtest/lite-linux-amd64
python ./utils/main.py
- name: 提交更改
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git pull origin main
git add ./TopFreeProxies-enhance-rr
git commit -m "$(date '+%Y-%m-%d %H:%M:%S')测速"
- name: 推送更改
uses: ad-m/github-push-action@master
with:
# github_token: ${{ secrets.TOKEN }}
branch: main