From ff234736b01ebde5b4c3d6ec3b8bf8e94824d4dd Mon Sep 17 00:00:00 2001 From: Andrew Taylor Date: Wed, 21 Feb 2024 21:31:22 -0800 Subject: [PATCH] Update README example --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2bf6610..20a7a07 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ This allows for more flexibility on how ESLint is run. This action is agnostic e | Name | Description | Required | Default Value | |---|---|---|---| -| `repo-token` | The [`GITHUB_TOKEN` secret](https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#about-the-github_token-secret) | No | `${{ github.token }}` | +| `GITHUB_TOKEN` | The [`GITHUB_TOKEN` secret](https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#about-the-github_token-secret) | No | `${{ github.token }}` | | `report-json` | Path or [glob pattern](https://github.com/actions/toolkit/tree/master/packages/glob) to locate the ESLint report JSON file. Use multiple lines to specify multiple glob patterns. | No | `eslint_report.json` | | `only-pr-files` | Only annotate files changed when run on the `pull_request` event | No | `true` | | `fail-on-warning` | Fail the GitHub Action when ESLint warnings are detected. Set to `true` to enable. | No | `false` | @@ -54,11 +54,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup Node - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 20 cache: 'npm' - name: Install Node Dependencies run: npm ci @@ -74,12 +74,13 @@ jobs: # Continue to the next step even if this fails continue-on-error: true - name: Annotate Code Linting Results - uses: ataylorme/eslint-annotate-action@v2 + uses: ataylorme/eslint-annotate-action@v3 with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} report-json: "eslint_report.json" # OPTIONAL: save a copy of the usage report for download or use in another job # - name: Upload ESLint report - # uses: actions/upload-artifact@v3 + # uses: actions/upload-artifact@v4 # with: # name: eslint_report.json # path: eslint_report.json