Files
free/.github/workflows/main.yml
2025-03-10 10:35:33 +08:00

41 lines
1.1 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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 main.py
run: python main.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