diff options
| author | 2026-01-16 09:37:20 +0800 | |
|---|---|---|
| committer | 2026-01-16 09:37:20 +0800 | |
| commit | ad36e0ce82770f9b3509ddb1cf96bc3422969806 (patch) | |
| tree | 6df911b964d0d32facf55844c55e61ba3878ae3f /.github/workflows/lint.yml | |
| parent | 455da9d2b07d05c2bdd1fffa5031a6a329cc5643 (diff) | |
| parent | 963b4b8567ac1bd8b23c41e1bfbd6a99d202d1ed (diff) | |
| download | DropOut-ad36e0ce82770f9b3509ddb1cf96bc3422969806.tar.gz DropOut-ad36e0ce82770f9b3509ddb1cf96bc3422969806.zip | |
Merge pull request #41 from HsiangNianian/main
Diffstat (limited to '.github/workflows/lint.yml')
| -rw-r--r-- | .github/workflows/lint.yml | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..5c4a69d --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,47 @@ +name: UI Auto Lint + +on: + push: + branches: ["main", "dev"] + paths: + - "ui/**" + workflow_dispatch: + +permissions: + contents: write + +jobs: + fix: + if: github.event_name != 'pull_request' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: "pnpm" + cache-dependency-path: "ui/pnpm-lock.yaml" + + - run: pnpm install + working-directory: ui + + - run: pnpm format + working-directory: ui + + - run: pnpm lint:fix + working-directory: ui + + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "style: auto format and lint fix [skip ci]" + file_pattern: "ui/**" |