diff --git a/.gitea/workflows/update-rules.yml b/.gitea/workflows/update-rules.yml index 7101996..2a15f97 100644 --- a/.gitea/workflows/update-rules.yml +++ b/.gitea/workflows/update-rules.yml @@ -13,11 +13,6 @@ jobs: runs-on: ubuntu-latest steps: - - name: 检出代码库 - uses: actions/checkout@v4 - with: - token: ${{ secrets.WORKFLOW_TOKEN }} - - name: 创建规则目录 run: mkdir -p ruleset @@ -45,10 +40,9 @@ jobs: echo "=== 文件大小统计 ===" du -h ruleset/* - - name: 提交规则文件到仓库 - run: | - git config --local user.email "action@github.com" - git config --local user.name "GitHub Action" - git add ruleset/ - git diff --staged --quiet || git commit -m "Auto update clash rules - $(date +%Y-%m-%d)" - git push https://x-access-token:${{ secrets.WORKFLOW_TOKEN }}@${{ github.server_url }}/${{ github.repository }}.git HEAD:main \ No newline at end of file + - name: 上传规则文件 + uses: actions/upload-artifact@v3 + with: + name: clash-rules-$(date +%Y%m%d) + path: ruleset/ + retention-days: 30 \ No newline at end of file