Skip to content

chore(deps): upgrade husky@9 (#5744) #905

chore(deps): upgrade husky@9 (#5744)

chore(deps): upgrade husky@9 (#5744) #905

---
name: ESLint --fix
on:
push:
branches: [next]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
permissions:
contents: read
jobs:
run:
name: Should the linter fix? 🤔
runs-on: ubuntu-latest
# workflow_dispatch always lets you select the branch ref, even though in this case we only ever want to run the action on `main` thus we need an if check
if: ${{ github.ref_name == 'next' }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install pnpm
run: corepack enable && pnpm --version
- name: Cache node modules
id: cache-node-modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-modules-${{ env.cache-name }}-
${{ runner.os }}-modules-
${{ runner.os }}-
- name: Install project dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: pnpm install
- name: Cache ESLint cache
uses: actions/cache@v3
with:
path: .eslintcache
key: eslint-v1-${{ hashFiles('.eslintrc.cjs') }}
- run: "pnpm lint:fix -- --rule 'prettier/prettier: [off]'"
- uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2
# Run even if `pnpm lint:fix` fails
if: always()
id: generate-token
with:
app_id: ${{ secrets.ECOSPARK_APP_ID }}
private_key: ${{ secrets.ECOSPARK_APP_PRIVATE_KEY }}
- uses: peter-evans/create-pull-request@b1ddad2c994a25fbc81a28b3ec0e368bb2021c50 # v6
# Run even if `lint:fix` fails
if: always()
with:
body: "I ran `pnpm lint:fix --rule 'prettier/prettier: [off]'` 🧑‍💻"
branch: actions/lint-fix-if-needed
commit-message: 'chore(lint): fix linter issues 🤖 ✨'
labels: 🤖 bot
title: 'chore(lint): fix linter issues 🤖 ✨'
token: ${{ steps.generate-token.outputs.token }}