Skip to content

Auto Update

Auto Update #265

Workflow file for this run

name: Auto Update
on:
schedule:
- cron: '0 7 * * *' # 每天早上7点执行
workflow_dispatch: # 允许手动触发
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11.5' # 使用你的Python版本
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
- name: Run Python script
run: |
python Actions/quanx.py & python Actions/clash.py
- name: Commit and Push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "$(date "+%Y/%m/%d %H:%M:%S")"
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{github.repository}}.git
git push