diff --git a/.github/workflows/eternity_convert.yml b/.github/workflows/convert.yml similarity index 100% rename from .github/workflows/eternity_convert.yml rename to .github/workflows/convert.yml diff --git a/.github/workflows/sub_merge.yml b/.github/workflows/merge.yml similarity index 92% rename from .github/workflows/sub_merge.yml rename to .github/workflows/merge.yml index 00425338f..26214b937 100644 --- a/.github/workflows/sub_merge.yml +++ b/.github/workflows/merge.yml @@ -32,8 +32,6 @@ jobs: run: | pip install -r ./utils/requirements.txt - name: 执行任务 - # env: - # CONFIG: ${{ secrets.CONFIG }} run: | python ./utils/list_merge.py @@ -48,5 +46,4 @@ jobs: - name: 推送更改 uses: ad-m/github-push-action@master with: - # github_token: ${{ secrets.TOKEN }} branch: master diff --git a/.github/workflows/speedtest.yml b/.github/workflows/speedtest.yml new file mode 100644 index 000000000..5e8fe440c --- /dev/null +++ b/.github/workflows/speedtest.yml @@ -0,0 +1,53 @@ +name: speedtest + +# 触发条件 +on: + workflow_dispatch: + + push: + paths: + - './sub/sub_merge_base64.txt' + +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: | + pip install -r ./utils/requirements.txt + - name: 执行任务 + # env: + # CONFIG: ${{ secrets.CONFIG }} + run: | + chmod +x ./utils/speedtest/litespeedtest + ./utils/speedtest/litespeedtest --config config.json --test https://raw.githubusercontent.com/alanbobs999/TopFreeProxies/master/sub/sub_merge_base64.txt + + + - name: 提交更改 + run: | + git config --local user.email "actions@github.com" + git config --local user.name "GitHub Actions" + git add ./utils + git add Eternity + git add README.md + git commit -m "$(date '+%Y-%m-%d %H:%M:%S')筛选节点" + - name: 推送更改 + uses: ad-m/github-push-action@master + with: + # github_token: ${{ secrets.TOKEN }} + branch: master diff --git a/utils/speedtest/config.json b/utils/speedtest/config.json new file mode 100644 index 000000000..00c07e7fd --- /dev/null +++ b/utils/speedtest/config.json @@ -0,0 +1,14 @@ +{ + "group":"FreeProxies", + "speedtestMode":"all", + "pingMethod":"googleping", + "sortMethod":"rspeed", + "concurrency":32, + "testMode":2, + "subscription":"https://raw.githubusercontent.com/alanbobs999/TopFreeProxies/master/sub/sub_merge_base64.txt", + "timeout":16, + "language":"en", + "fontSize":24, + "theme":"rainbow", + "generatePicMode": 1 +} \ No newline at end of file diff --git a/utils/speedtest/litespeedtest b/utils/speedtest/litespeedtest new file mode 100644 index 000000000..8fc05d08e Binary files /dev/null and b/utils/speedtest/litespeedtest differ