From 8109915e20d2a91a6c98d8e9ef778f1864f96b65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Sat, 15 Aug 2026 21:06:22 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96CI=E6=97=B6=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/l10n.yml | 21 +++++++++++++-------- .github/workflows/mockery.yml | 19 +++++++++++++------ 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/.github/workflows/l10n.yml b/.github/workflows/l10n.yml index 0d97464e..998d1ad9 100644 --- a/.github/workflows/l10n.yml +++ b/.github/workflows/l10n.yml @@ -2,8 +2,8 @@ name: L10n on: workflow_dispatch: concurrency: - group: l10n - cancel-in-progress: true + group: codegen + cancel-in-progress: false permissions: contents: write pull-requests: write @@ -36,14 +36,19 @@ jobs: - name: Install xgotext run: | go install github.com/leonelquinteros/gotext/cli/xgotext@latest - - name: Generate pot files + - name: Generate pot files and commit run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" ~/go/bin/xgotext -default backend -pkg-tree ./cmd/ace -out ./pkg/embed/locales - cd web && pnpm run gettext:extract - - uses: stefanzweifel/git-auto-commit-action@v7 - name: Commit changes - with: - commit_message: "chore(l10n): update pot files" + (cd web && pnpm run gettext:extract) + if [ -z "$(git status --porcelain)" ]; then + echo "pot 文件无变更,跳过提交" + exit 0 + fi + git add -A + git commit -m "chore(l10n): update pot files" + git push origin HEAD:main - name: Sync with Crowdin uses: crowdin/github-action@v2 with: diff --git a/.github/workflows/mockery.yml b/.github/workflows/mockery.yml index d6a304c7..6a596807 100644 --- a/.github/workflows/mockery.yml +++ b/.github/workflows/mockery.yml @@ -3,6 +3,9 @@ on: push: branches: - main +concurrency: + group: codegen + cancel-in-progress: false permissions: contents: write jobs: @@ -19,11 +22,15 @@ jobs: - name: Install Mockery run: | go install github.com/vektra/mockery/v2@latest - - name: Generate Mocks + - name: Generate mocks and commit run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" ~/go/bin/mockery - git pull - - uses: stefanzweifel/git-auto-commit-action@v7 - name: Commit changes - with: - commit_message: "chore: update mocks" + if [ -z "$(git status --porcelain)" ]; then + echo "mock 无变更,跳过提交" + exit 0 + fi + git add -A + git commit -m "chore: update mocks" + git push origin HEAD:main