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