mirror of
https://github.com/rommapp/romm.git
synced 2026-11-29 10:01:00 +01:00
Adds zizmor to Trunk, which audits GitHub Actions workflows, and clears the 19 findings it reports: - Every actions/checkout now sets persist-credentials: false, so the token stops being written into .git/config where any later step (or an uploaded artifact) could read it. - Service ports and the release version move from run-block template expansions into env vars, keeping expansion out of the shell. - Frontend Checks drops read-all for the contents: read it actually needs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
62 lines
1.5 KiB
YAML
62 lines
1.5 KiB
YAML
name: Frontend Checks
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "frontend/**"
|
|
push:
|
|
branches:
|
|
- "master"
|
|
paths:
|
|
- "frontend/**"
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
with:
|
|
node-version-file: frontend/.nvmrc
|
|
cache: "npm"
|
|
cache-dependency-path: frontend/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
working-directory: frontend
|
|
|
|
- name: Run tests (vitest, includes Storybook play() tests)
|
|
run: npm test
|
|
working-directory: frontend
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
with:
|
|
node-version-file: frontend/.nvmrc
|
|
cache: "npm"
|
|
cache-dependency-path: frontend/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
working-directory: frontend
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
working-directory: frontend
|