Skip to content

Update stefanzweifel/git-auto-commit-action action to v5 #254

Update stefanzweifel/git-auto-commit-action action to v5

Update stefanzweifel/git-auto-commit-action action to v5 #254

Workflow file for this run

on:
pull_request:
jobs:
lint-and-fix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4
- uses: actions/setup-node@v3
with:
node-version-file: .node-version
- name: Cache dependencies
uses: actions/[email protected]
with:
path: "**/node_modules/"
key:
${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json')
}}
restore-keys: |
${{ runner.os }}-node_modules-
- name: Install dependencies
run: npm ci
- id: lint
name: Run linter
run: npm run lint
- if: failure() && steps.lint.outcome == 'failure'
name: Fix linter failures
run: npm run lint:fix
- if: |
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name == github.repository &&
failure() &&
steps.lint.outcome == 'failure'
uses: stefanzweifel/[email protected]
with:
commit_message: Apply automatic fixes
commit_user_name: GitHub Actions
commit_user_email: [email protected]
commit_author: GitHub Actions <[email protected]>