ivp #897
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: ivp | |
# 触发条件 | |
on: | |
workflow_dispatch: | |
schedule: | |
# - cron: '*/5 * * * *' | |
# 表达式生成 https://crontab.guru/ | |
- cron: '0 7,19 * * *' | |
jobs: | |
main: | |
name: Merge & speedtest | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
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 'America/New_York' | |
- name: Install dependencies | |
run: pip install -r ./utils/requirements.txt | |
- name: Start Clash proxy environment | |
run: | | |
sudo sh ./utils/scripts/set_proxy.sh | |
- name: Merge & speedtest | |
run: | | |
chmod +x ./utils/subconverter/subconverter-linux-amd64 && chmod +x ./utils/litespeedtest/lite-linux-amd64 | |
python ./utils/main.py | |
- name: Commit change | |
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 ./update | |
git add ./Eternity | |
git add ./Eternity.yaml | |
git add README.md | |
git commit -m 'first commit' | |
- name: Push | |
uses: ad-m/github-push-action@master | |
with: | |
branch: master |