diff --git a/.github/workflows/autofix.yml b/.github/workflows/autofix.yml new file mode 100644 index 00000000..f0c75c5f --- /dev/null +++ b/.github/workflows/autofix.yml @@ -0,0 +1,35 @@ +name: autofix.ci + +on: + pull_request: + push: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + +jobs: + autofix: + name: autofix + runs-on: ubuntu-latest + if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }} + steps: + - name: Checkout + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 + with: + node-version: 24.x + - uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5 + with: + cache: true + run_install: true + - run: pnpm run format:fix + - run: pnpm run lint:fix + - name: Apply fixes + uses: autofix-ci/action@c5b2d67aa2274e7b5a18224e8171550871fc7e4a # v1 + with: + commit-message: 'ci: apply automated fixes'