更新 .gitea/workflows/update-rules.yml
Some checks failed
Download Clash Rules / download-rules (push) Failing after 1m26s

This commit is contained in:
2025-09-11 22:55:03 -07:00
parent fa78b64961
commit 0f136b52d8

View File

@@ -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
- name: 上传规则文件
uses: actions/upload-artifact@v3
with:
name: clash-rules-$(date +%Y%m%d)
path: ruleset/
retention-days: 30