From bf95ffe422a945a0f0c07d204e1a1ea41f9580fb Mon Sep 17 00:00:00 2001 From: Jordan Padams <33492486+jordanpadams@users.noreply.github.com> Date: Mon, 16 Dec 2024 09:45:29 -0800 Subject: [PATCH] Add SLOC count to scans --- .github/workflows/codeql-analysis.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 500f28b..46dc7be 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -77,3 +77,30 @@ jobs: with: name: codeql-artifacts path: ${{ env.RESULTS_DIR }} + + sloc-count: + name: SLOC Count + runs-on: ubuntu-latest + if: github.actor != 'pdsen-ci' + steps: + - + name: 💳 Checkout + uses: actions/checkout@v4 + with: + lfs: true + fetch-depth: 0 + token: ${{secrets.ADMIN_GITHUB_TOKEN}} + + - + name: Count Lines of Code (cloc) + uses: djdefi/cloc-action@6 + with: + options: --report-file=cloc.md + + + - + name: Upload SLOC + uses: actions/upload-artifact@v4 + with: + name: sloc-count + path: ${{ github.workspace }}/cloc.md