File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ inputs:
1717 github_token :
1818 description : Token with packages write (typically secrets.GITHUB_TOKEN)
1919 required : true
20+ sbom :
21+ description : Generate an SBOM (enable for released images; skip for ephemeral PR/dev builds to save time)
22+ required : false
23+ default : ' false'
2024
2125runs :
2226 using : composite
5155 labels : ${{ steps.meta.outputs.labels }}
5256 annotations : ${{ steps.meta.outputs.annotations }}
5357 provenance : mode=min
54- sbom : true
58+ sbom : ${{ inputs.sbom }}
5559 cache-from : type=gha
5660 cache-to : type=gha,mode=max
5761 build-args : |
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ inputs:
1010 github_token :
1111 description : Token with packages write (typically secrets.GITHUB_TOKEN)
1212 required : true
13+ sbom :
14+ description : Generate an SBOM (enable for released images; skip for ephemeral PR/dev builds to save time)
15+ required : false
16+ default : ' false'
1317
1418runs :
1519 using : composite
4549 labels : ${{ steps.meta.outputs.labels }}
4650 annotations : ${{ steps.meta.outputs.annotations }}
4751 provenance : mode=min
48- sbom : true
52+ sbom : ${{ inputs.sbom }}
4953 cache-from : type=gha
5054 cache-to : type=gha,mode=max
Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ jobs:
123123 labels : ${{ steps.meta.outputs.labels }}
124124 annotations : ${{ steps.meta.outputs.annotations }}
125125 provenance : mode=min
126- sbom : true
126+ sbom : ${{ github.event_name == 'release' }}
127127 cache-from : type=gha
128128 cache-to : type=gha,mode=max
129129
@@ -176,7 +176,7 @@ jobs:
176176 labels : ${{ steps.meta.outputs.labels }}
177177 annotations : ${{ steps.meta.outputs.annotations }}
178178 provenance : mode=min
179- sbom : true
179+ sbom : ${{ github.event_name == 'release' }}
180180 cache-from : type=gha
181181 cache-to : type=gha,mode=max
182182 build-args : |
Original file line number Diff line number Diff line change @@ -53,10 +53,10 @@ jobs:
5353 - name : Run frontend unit tests
5454 run : yarn workspace frontend test:unit
5555
56- cypress-run :
57- name : Cypress E2E Tests
56+ static-checks :
57+ name : Lint, Format & Types
5858 runs-on : ubuntu-latest
59- timeout-minutes : 45
59+ timeout-minutes : 15
6060 steps :
6161 - name : Checkout
6262 uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
7878 - name : Compile
7979 run : yarn check-types
8080
81+ cypress-run :
82+ name : Cypress E2E Tests
83+ runs-on : ubuntu-latest
84+ timeout-minutes : 45
85+ steps :
86+ - name : Checkout
87+ uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
88+
89+ - name : Setup NodeJS
90+ uses : ./.github/actions/setup-node
91+ with :
92+ node-version : 22
93+
94+ - name : Install dependencies
95+ run : yarn install --frozen-lockfile
96+
8197 # Cypress: only the Vite dev server is started. cypress.config.ts sets apiUrl to :5000 for
8298 # specs that hit the API—if CI runs those, also start the server (e.g. concurrently) or align with build_packages.yml (yarn dev).
8399 - name : Cypress run
Original file line number Diff line number Diff line change 1+ # syntax=docker/dockerfile:1
12ARG build_image=node:22-alpine
23ARG runtime_image=caddy:alpine
34
45# build stage
56FROM ${build_image} AS build-stage
67WORKDIR /app
7- ENV HUSKY=0
8- COPY . .
8+ ENV HUSKY=0 \
9+ YARN_NETWORK_CONCURRENCY=8
10+
11+ # Install deps first so this layer stays cached unless a manifest/lockfile changes.
12+ # The whole workspace is resolved against the root lockfile, so every member
13+ # package.json must be present for `--frozen-lockfile` to succeed.
14+ COPY package.json yarn.lock ./
15+ COPY frontend/package.json ./frontend/
16+ COPY server/package.json ./server/
17+ RUN --mount=type=cache,target=/root/.cache/yarn \
18+ yarn install --frozen-lockfile --network-timeout 600000 --non-interactive
19+
920# CI passes legacy secret names (REACT_APP_*). Map them to Vite env for `vite build`.
1021ARG REACT_APP_INSIGHTS_PROJECT_ID
1122ARG REACT_APP_HOST_BACKEND
1223ENV VITE_INSIGHTS_PROJECT_ID=$REACT_APP_INSIGHTS_PROJECT_ID
1324ENV VITE_HOST_BACKEND=$REACT_APP_HOST_BACKEND
14- RUN yarn install --frozen-lockfile --network-timeout 600000 --non-interactive
25+
26+ # Copy source last so edits don't invalidate the dependency layer above.
27+ COPY frontend ./frontend
1528RUN yarn workspace frontend build
1629
1730# production stage
You can’t perform that action at this time.
0 commit comments