ci: usar docker para o html linter
This commit is contained in:
@@ -12,7 +12,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
# 1. SECRET SCANNING (Desativado temporariamente para testar o resto)
|
# 1. SECRET SCANNING (Desativado temporariamente)
|
||||||
#- name: Gitleaks Scan
|
#- name: Gitleaks Scan
|
||||||
# run: |
|
# run: |
|
||||||
# curl -sL https://github.com/gitleaks/gitleaks/releases/download/v8.18.2/gitleaks_8.18.2_linux_x64.tar.gz | tar -xz -C /tmp
|
# curl -sL https://github.com/gitleaks/gitleaks/releases/download/v8.18.2/gitleaks_8.18.2_linux_x64.tar.gz | tar -xz -C /tmp
|
||||||
@@ -24,16 +24,10 @@ jobs:
|
|||||||
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin
|
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin
|
||||||
trivy image --severity HIGH,CRITICAL nginx:alpine
|
trivy image --severity HIGH,CRITICAL nginx:alpine
|
||||||
|
|
||||||
# 3. LINTING & QUALIDADE (Com Node.js adicionado e sem sudo)
|
# 3. LINTING & QUALIDADE (Usando uma imagem Docker oficial com HTMLHint já instalado)
|
||||||
- name: Setup Node.js
|
- name: HTML Linter (Docker)
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: '20'
|
|
||||||
|
|
||||||
- name: HTML/CSS Linter
|
|
||||||
run: |
|
run: |
|
||||||
npm install -g htmlhint stylelint stylelint-config-standard
|
docker run --rm -v ${{ github.workspace }}:/web tmknom/htmlhint htmlhint /web/index.html
|
||||||
htmlhint index.html
|
|
||||||
|
|
||||||
# 4. SAST - Análise de Código com SonarQube
|
# 4. SAST - Análise de Código com SonarQube
|
||||||
- name: SonarQube Analysis
|
- name: SonarQube Analysis
|
||||||
|
|||||||
Reference in New Issue
Block a user