From 39a385ab0491b4cf326028c9f8640d29cba985c5 Mon Sep 17 00:00:00 2001 From: Wolfsblvt Date: Wed, 19 Mar 2025 19:58:00 +0100 Subject: [PATCH] Update eslint workflows version + formatting - Add explicit version numbers (to prevent update conflicts) - Separate the steps and give them names, for better readability on workflow log - Only run on opened/synchronize --- .github/workflows/pr-run-eslint.yml | 33 +++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr-run-eslint.yml b/.github/workflows/pr-run-eslint.yml index 3387b5fd1..4e30608c9 100644 --- a/.github/workflows/pr-run-eslint.yml +++ b/.github/workflows/pr-run-eslint.yml @@ -1,17 +1,38 @@ name: ✅ Check ESLint on PR -on: pull_request +on: + pull_request: # TODO: change to pull_request_target for 'staging' + types: [opened, synchronize] + +permissions: + contents: read + pull-requests: write jobs: - eslint: + run-eslint: + name: ✅ Check ESLint on PR runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - name: Checkout Repository + # Checkout + # https://github.com/marketplace/actions/checkout + uses: actions/checkout@v4.2.2 + + - name: Setup Node.js + # Setup Node.js environment + # https://github.com/marketplace/actions/setup-node-js-environment + uses: actions/setup-node@v4.3.0 with: node-version: 20 - - run: npm ci - - uses: sibiraj-s/action-eslint@v3 + + - name: Run npm install + run: npm ci + + - name: Run ESLint + # Action ESLint + # https://github.com/marketplace/actions/action-eslint + uses: sibiraj-s/action-eslint@v3.0.1 with: token: ${{ secrets.GITHUB_TOKEN }} eslint-args: '--ignore-path=.gitignore --quiet'