mirror of
https://github.com/mahdibland/V2RayAggregator.git
synced 2026-06-12 21:02:34 +08:00
58 lines
1.6 KiB
YAML
58 lines
1.6 KiB
YAML
name: speedtest_yaml
|
|
|
|
# 触发条件
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
paths:
|
|
- "./sub/sub_merge_base64.txt"
|
|
- "./sub/sub_merge_yaml.yml"
|
|
|
|
schedule:
|
|
- cron: "15 1,13 * * *"
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
- name: Install Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: "3.x"
|
|
- name: Load Cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.cache/pip
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/run_in_Actions/requirements.txt') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pip-
|
|
- name: Set Timezone
|
|
run: sudo timedatectl set-timezone 'Asia/Tehran'
|
|
- name: Install Dependencies
|
|
run: |
|
|
pip install -r ./utils/requirements.txt
|
|
- name: Run Lite Speedtest
|
|
run: |
|
|
sudo sh ./utils/speedtest/speedtest2_yamlc.sh
|
|
python ./utils/speedtest/output.py
|
|
- name: Commit changes
|
|
run: |
|
|
git config --local user.email "actions@github.com"
|
|
git config --local user.name "GitHub Actions"
|
|
git pull origin master
|
|
git add EternityBase
|
|
git add Eternity
|
|
git add Eternity.txt
|
|
git add ./sub/sub_merge.txt
|
|
git add ./sub/sub_merge_base64.txt
|
|
git add LogInfo.txt
|
|
git commit -m "$(date '+%Y-%m-%d %H:%M:%S') Filter Nodes"
|
|
- name: Push Change
|
|
uses: ad-m/github-push-action@master
|
|
with:
|
|
# github_token: ${{ secrets.TOKEN }}
|
|
branch: master
|