27 lines
719 B
YAML
27 lines
719 B
YAML
name: Download Clash Rules
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [ main, master ]
|
|
|
|
jobs:
|
|
download-rules:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
# 不使用 actions/checkout,直接手动克隆
|
|
- name: Manual Clone Repository
|
|
run: |
|
|
git clone https://${{ secrets.GITHUB_TOKEN }}@${GITHUB_SERVER_URL#}/${{ github.repository }}.git .
|
|
git config user.name "Bot"
|
|
git config user.email "bot@example.com"
|
|
|
|
- name: Test commit
|
|
run: |
|
|
mkdir -p ruleset
|
|
echo "test $(date)" > ruleset/test.txt
|
|
|
|
git add .
|
|
git commit -m "Test commit" || echo "No changes"
|
|
git push || echo "Push failed" |