mirror of
https://github.com/mahdibland/V2RayAggregator.git
synced 2026-06-03 21:01:49 +08:00
104 lines
3.4 KiB
YAML
104 lines
3.4 KiB
YAML
name: Collect
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
paths:
|
|
- "./EternityBase"
|
|
- "./sub/sub_merge_base64.txt"
|
|
- "./sub/sub_merge_yaml.yml"
|
|
|
|
schedule:
|
|
# - cron: '*/5 * * * *'
|
|
# 表达式生成 https://crontab.guru/
|
|
- cron: "0 0,12 * * *"
|
|
|
|
jobs:
|
|
main:
|
|
name: Collect & SpeedTest & Filter
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.x"
|
|
cache: "pip"
|
|
- uses: actions/cache@v3
|
|
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 Requirements
|
|
run: |
|
|
pip install -r ./utils/requirements.txt
|
|
|
|
- name: Running Collector
|
|
run: |
|
|
wget -O subconverter.tar.gz https://github.com/tindy2013/subconverter/releases/download/v0.7.2/subconverter_linux64.tar.gz
|
|
tar -zxvf subconverter.tar.gz -C ./
|
|
chmod +x ./subconverter/subconverter && nohup ./subconverter/subconverter >./subconverter.log 2>&1 &
|
|
python ./utils/list_merge.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 ./sub
|
|
git add ./utils/Country.mmdb
|
|
git add README.md
|
|
git checkout master
|
|
git commit -m "✔️ $(date '+%Y-%m-%d %H:%M:%S') Collected"
|
|
- name: Push Changes
|
|
uses: ad-m/github-push-action@master
|
|
with:
|
|
branch: master
|
|
|
|
- name: Run Lite Speedtest
|
|
run: |
|
|
sleep 5
|
|
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') Tested"
|
|
- name: Push Change
|
|
uses: ad-m/github-push-action@master
|
|
with:
|
|
branch: master
|
|
|
|
- name: Run Convertor & Formatter
|
|
run: |
|
|
sleep 5
|
|
wget -O subconverter.tar.gz https://github.com/tindy2013/subconverter/releases/download/v0.7.2/subconverter_linux64.tar.gz
|
|
tar -zxvf subconverter.tar.gz -C ./
|
|
chmod +x ./subconverter/subconverter && nohup ./subconverter/subconverter >./subconverter.log 2>&1 &
|
|
python ./utils/eternity_convert.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 Eternity.yml
|
|
git add Eternity
|
|
git add README.md
|
|
git add ./update/*
|
|
git add LogInfo.txt
|
|
git commit -m "✔️ $(date '+%Y-%m-%d %H:%M:%S') Filtered"
|
|
- name: Push Change
|
|
uses: ad-m/github-push-action@master
|
|
with:
|
|
branch: master
|