@smi-digital/create-smi-app 2.10.1 → 2.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smi-digital/create-smi-app",
3
- "version": "2.10.1",
3
+ "version": "2.11.1",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -2,13 +2,25 @@ name: PR Validation
2
2
 
3
3
  on:
4
4
  pull_request:
5
- branches: [ "main" ]
5
+ branches: ["main"]
6
+
7
+ # Superseded pushes to the same PR cancel the previous run (saves minutes).
8
+ concurrency:
9
+ group: pr-validation-${{ github.event.pull_request.number || github.ref }}
10
+ cancel-in-progress: true
11
+
12
+ # Least-privilege token. Do not remove `pull-requests: read` — change
13
+ # detection needs it to list the PR's changed files.
14
+ permissions:
15
+ contents: read
16
+ pull-requests: read
6
17
 
7
18
  jobs:
8
- run-ci:
9
- uses: smi-digital/ci-library/.github/workflows/basic-strapi-astro-pipeline.yml@main
10
- with:
11
- # Define your directory paths here.
12
- # If your folders are exactly 'frontend' and 'backend', you can omit these lines entirely.
13
- frontend_dir: './frontend'
14
- backend_dir: './backend'
19
+ ci:
20
+ uses: smi-digital/ci-library/.github/workflows/pr-strapi-astro-pipeline.yml@main
21
+ # Defaults match this scaffold's layout (frontend/ + backend/, Node 24).
22
+ # See the smi-digital/ci-library README for all available inputs
23
+ # (frontend_dir, backend_dir, node_version, audit_level,
24
+ # backend_audit_mode, run_integration, run_sast).
25
+ #
26
+ # Branch protection: require the single check "ci / CI Status" on main.
@@ -11,7 +11,10 @@ RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev l
11
11
  WORKDIR /opt/
12
12
  COPY package.json package-lock.json* ./
13
13
  RUN npm install -g node-gyp
14
- RUN npm config set fetch-retry-maxtimeout 600000 -g && npm install
14
+ # Use `npm ci` for a deterministic install straight from the lockfile. This also
15
+ # installs sharp's pinned prebuilt musl binary (@img/sharp-linuxmusl-x64), which
16
+ # `npm install` skips when the lockfile was generated on another OS (npm/cli#4828).
17
+ RUN npm config set fetch-retry-maxtimeout 600000 -g && npm ci
15
18
  ENV PATH=/opt/node_modules/.bin:$PATH
16
19
 
17
20
  WORKDIR /opt/app
@@ -27,7 +30,8 @@ ENV NODE_ENV=${NODE_ENV}
27
30
  WORKDIR /opt/
28
31
  COPY package.json package-lock.json* ./
29
32
  RUN npm install -g node-gyp
30
- RUN npm config set fetch-retry-maxtimeout 600000 -g && npm install --omit=dev
33
+ # Deterministic prod install from the lockfile (see builder stage note re: sharp).
34
+ RUN npm config set fetch-retry-maxtimeout 600000 -g && npm ci --omit=dev
31
35
  ENV PATH=/opt/node_modules/.bin:$PATH
32
36
 
33
37
  WORKDIR /opt/app