From b5f3adbe82c39caa9ab7fb2193f1267beb951ca8 Mon Sep 17 00:00:00 2001 From: Julia Xu <41178451+xyj-3@users.noreply.github.com> Date: Thu, 16 Nov 2023 22:56:05 -0500 Subject: [PATCH] Upload ESLint code scanning results to GitHub (#357) #222 --- .github/workflows/node.js.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index c4d78d9d..ba9683da 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -36,4 +36,17 @@ jobs: uses: coverallsapp/github-action@master with: github-token: ${{ secrets.GITHUB_TOKEN }} - - run: yarn lint + - uses: actions/checkout@v4 + with: + repository: xyj-3/sarif-js-sdk + ref: e23ca2d8dc6d70a7959a2098eba8ac332de907bb + path: sarif-js-sdk + - name: Install ESLint formatter + run: yarn add file:sarif-js-sdk/packages/eslint-formatter-sarif + - name: Run ESLint with formatter + run: yarn lint --format @microsoft/eslint-formatter-sarif --output-file eslint-results.sarif + - name: Upload ESLint result to GitHub + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: eslint-results.sarif + wait-for-processing: true