From d1d6ba58b7e9447f6ed634a75680729d740a043a Mon Sep 17 00:00:00 2001 From: nocci Date: Thu, 8 Jan 2026 15:55:20 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20ci(build):=20enhance=20sonar=20j?= =?UTF-8?q?ob=20in=20build=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - add container support with node:20-alpine for sonar job - consolidate git and utility installation steps - include sonarqube-scanner installation for improved analysis --- .forgejo/workflows/build.yml | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index fcba226..98e6eb6 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -30,18 +30,23 @@ jobs: - name: Run ESLint run: npm run lint - sonar: - needs: lint - runs-on: self-hosted - steps: - - name: Manual Git Checkout - run: | - apt-get update - apt-get install -y git - git init - git remote add origin ${{ env.REPO_URL }}/${{ github.repository }}.git - git fetch --depth 1 origin ${{ github.ref }} - git checkout FETCH_HEAD + sonar: + needs: lint + runs-on: self-hosted + container: + image: node:20-alpine + steps: + - name: Manual Git Checkout and Prepare + run: | + apk add --no-cache git curl bash + git init + git remote add origin ${{ env.REPO_URL }}/${{ github.repository }}.git + git fetch --depth 1 origin ${{ github.ref }} + git checkout FETCH_HEAD + + - name: Install Node.js and Sonar Scanner + run: | + npm install -g sonarqube-scanner - name: Install Node.js run: |