Airport Collect #3259
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Airport Collect | |
on: | |
workflow_dispatch: | |
schedule: | |
# - cron: '*/5 * * * *' | |
# 表达式生成 https://crontab.guru/ | |
- cron: "30 */2 * * *" | |
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" | |
# setup actions has built-in caching function | |
# - 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_airport.py | |
- name: Commit Changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git pull origin master | |
git add ./sub | |
git checkout master | |
# git add README.md | |
# git add ./utils/Country.mmdb | |
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/airport/speedtest/speedtest2_yaml.sh | |
python ./utils/airport/speedtest/output.py | |
- name: Commit changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git pull origin master | |
git add EternityAir | |
git add EternityAir.txt | |
git add LogInfoAir.txt | |
git add ./sub | |
# git add ./sub/airport_sub_merge.txt | |
# git add ./sub/airport_merge_base64.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_airport.py | |
- name: Commit changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git pull origin master | |
git add EternityAir.yml | |
git add ./update/* | |
git add LogInfoAir.txt | |
# git add Eternity | |
# git add README.md | |
git commit -m "♻️ $(date '+%Y-%m-%d %H:%M:%S') Filtered" | |
- name: Push Change | |
uses: ad-m/github-push-action@master | |
with: | |
branch: master |