diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 1f3e9afa..3295b0c0 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -7,6 +7,10 @@ on: concurrency: ${{ github.workflow }}-${{ github.ref }} +permissions: + checks: write + contents: write + jobs: lint: name: Lint @@ -15,8 +19,6 @@ jobs: - id: checkout name: Checkout repository uses: actions/checkout@v4 - with: - fetch-depth: 0 - id: setup-node name: Setup Node.JS @@ -28,22 +30,11 @@ jobs: - id: install-deps name: Install dependencies run: npm ci - - - id: lint - name: Lint code - run: npm run lint - - id: format - name: Format code - run: npm run format - - - id: commit_and_push - name: Commit and push formatted code - run: | - git config --global user.name 'github-actions[bot]' - git config --global user.email 'github-actions[bot]@users.noreply.github.com' - git add . - git commit --allow-empty -m "lint and format" - git push - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - id: run-linters + name: Run linters + uses: wearerequired/lint-action@v2 + with: + auto_fix: true + eslint: true + prettier: true