Skip to content

Commit

Permalink
fix: ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
nickevansuk authored Sep 22, 2023
1 parent b860c60 commit 8d8bc79
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/eslint-auto-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ permissions:
pull-requests: write

jobs:
# Has dependabot created this PR?
dependabot-metadata:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
Expand All @@ -17,10 +18,30 @@ jobs:
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
create-pr:
# Is this PR an eslint upgrade?
lint-test:
runs-on: ubuntu-latest
needs: dependabot-metadata
if: ${{needs.dependabot-metadata.outputs.dependency-group == 'eslint' }}
if: ${{ needs.dependabot-metadata.outputs.dependency-group == 'eslint' }}
outputs:
outcome: ${{ steps.lint-test.outcome }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14
- name: Install
run: npm ci
- name: Lint test
id: lint-test
run: npm run lint
# Has the eslint upgrade resulted in lint errors? If so, create a PR to attempt a lint --fix, in case they can be automatically resolved
create-pr:
runs-on: ubuntu-latest
needs: lint-test
if: ${{ always() && needs.lint-test.outputs.outcome == 'failure' }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down

0 comments on commit 8d8bc79

Please sign in to comment.