Skip to content

fix(admin): 优化 Topic 向导、支持 Inbox,并修复非法 XML 字符解析失败 #905

fix(admin): 优化 Topic 向导、支持 Inbox,并修复非法 XML 字符解析失败

fix(admin): 优化 Topic 向导、支持 Inbox,并修复非法 XML 字符解析失败 #905

Workflow file for this run

name: Lint
on:
push:
branches: ["main", "dev"]
pull_request:
branches: ["main", "dev"]
permissions:
contents: write
jobs:
format-and-lint:
name: Format and Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.25.13"
cache: false
- name: Install golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
args: --timeout=10m
- uses: pnpm/action-setup@v6
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: "pnpm"
cache-dependency-path: web/admin/pnpm-lock.yaml
- name: Install Task
run: sudo sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin
- name: Install frontend dependencies
run: pnpm --dir web/admin install --frozen-lockfile
- name: Run format and lint workflow
run: task fix
- name: Commit changes
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
env:
TARGET_REF: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }}
run: |
if [ -n "$(git status --porcelain)" ]; then
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git fetch origin
git checkout -B "$TARGET_REF" "origin/$TARGET_REF"
git add .
git commit -m "style: auto-format code"
if [[ ! "$TARGET_REF" =~ ^[a-zA-Z0-9/_-]+$ ]]; then
echo "Invalid branch name: $TARGET_REF"
exit 1
fi
git push origin "HEAD:$TARGET_REF"
fi