mirror of
https://github.com/tnb-labs/panel.git
synced 2026-09-01 14:55:12 +08:00
feat: 优化CI时序
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user