This commit is contained in:
@@ -1,27 +1,17 @@
|
|||||||
name: Download Clash Rules
|
name: Push测试
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
|
||||||
push:
|
push:
|
||||||
branches: [ main, master ]
|
branches: [ main ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
download-rules:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# 不使用 actions/checkout,直接手动克隆
|
- uses: actions/checkout@v3
|
||||||
- name: Manual Clone Repository
|
- name: 运行测试
|
||||||
run: |
|
run: |
|
||||||
git clone https://${{ secrets.GITHUB_TOKEN }}@${GITHUB_SERVER_URL#}/${{ github.repository }}.git .
|
echo "Push事件触发成功"
|
||||||
git config user.name "Bot"
|
echo "提交SHA: ${{ github.sha }}"
|
||||||
git config user.email "bot@example.com"
|
echo "提交者: ${{ github.actor }}"
|
||||||
|
|
||||||
- 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"
|
|
||||||
Reference in New Issue
Block a user