diff options
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/**" |