diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000..2a3b980 --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,26 @@ +name: Format + +on: + push: + branches: + - main + +jobs: + format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + - uses: pnpm/action-setup@v3 + - uses: actions/setup-node@v4 + with: + node-version: 18 + cache: "pnpm" + - run: pnpm install + - run: pnpm run format + - uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "[ci] format" + branch: ${{ github.head_ref }} + commit_author: ${{ github.event.commits[0].author.name }} <${{ github.actor }}@users.noreply.github.com>