初版可以使用

This commit is contained in:
wangqiupei
2025-03-09 22:32:52 +08:00
parent 36a979274e
commit abfeceafe0
4 changed files with 753 additions and 58 deletions

40
.github/workflows/main.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: free-v2ray-node
on:
schedule:
- cron: '0 0,6,12,18 * * *'
push:
paths-ignore:
- '**'
workflow_dispatch:
jobs:
run_demo_actions:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# 转到 Settings > Secrets and variables > Actions
# 点击 New repository secret添加 Secret名称为 BOT输入你的token
token: ${{ secrets.BOT }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.10.10'
- name: Install requirements.txt
run: |
pip install -r ./requirements.txt
- name: Run ClashForge.py
run: python ClashForge.py
- name: Commit and push file
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add v2ray.txt
git commit -m "update" || echo "No changes to commit"
git push https://${{ secrets.BOT }}:x-oauth-basic@github.com/${GITHUB_REPOSITORY}.git