👷 ci(build): enhance sonar job in build workflow
- add container support with node:20-alpine for sonar job - consolidate git and utility installation steps - include sonarqube-scanner installation for improved analysis
This commit is contained in:
parent
7df5c2e2fe
commit
d1d6ba58b7
1 changed files with 17 additions and 12 deletions
|
|
@ -30,18 +30,23 @@ jobs:
|
||||||
- name: Run ESLint
|
- name: Run ESLint
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
|
|
||||||
sonar:
|
sonar:
|
||||||
needs: lint
|
needs: lint
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
steps:
|
container:
|
||||||
- name: Manual Git Checkout
|
image: node:20-alpine
|
||||||
run: |
|
steps:
|
||||||
apt-get update
|
- name: Manual Git Checkout and Prepare
|
||||||
apt-get install -y git
|
run: |
|
||||||
git init
|
apk add --no-cache git curl bash
|
||||||
git remote add origin ${{ env.REPO_URL }}/${{ github.repository }}.git
|
git init
|
||||||
git fetch --depth 1 origin ${{ github.ref }}
|
git remote add origin ${{ env.REPO_URL }}/${{ github.repository }}.git
|
||||||
git checkout FETCH_HEAD
|
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
|
- name: Install Node.js
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue