From 0f136b52d84e2207b90596cd25d2548407e0ea0e Mon Sep 17 00:00:00 2001 From: adminroot Date: Thu, 11 Sep 2025 22:55:03 -0700 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitea/workflows/update-ru?= =?UTF-8?q?les.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/update-rules.yml | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) 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