Skip to content
Merged
10 changes: 5 additions & 5 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [ '20', '22', '24' ]
node: [ '22', '24', '26' ]

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: 🐋 Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: 🏗️ Build Docker image
uses: docker/bake-action@v6
- name: 🏗️ Build Docker image
uses: docker/bake-action@v7
env:
NODE_VERSION: ${{ matrix.node }}
STREAM: ${{ env.stream }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-push-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ jobs:
stream: stable
push: true
branch: releases
node_versions: '["22","24"]'
alpine_version: '3.21'
secrets: inherit
21 changes: 15 additions & 6 deletions .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ on:
type: string
default: main
description: Branch name to build from.
node_versions:
type: string
default: '["22","24","26"]'
description: JSON array of Node.js versions to build.
alpine_version:
type: string
default: '3.24'
description: Alpine Linux version to build against.

secrets:
DOCKERHUB_USERNAME:
Expand All @@ -38,34 +46,35 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [ '20', '22', '24' ]
node: ${{ fromJson(inputs.node_versions) }}

steps:
- name: 📥 Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
ref: ${{ inputs.branch }}

- name: 🔑 Login to Docker Hub
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: 🔑 Log in to the GitHub Container Registry
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: 🐋 Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4

- name: 🏗️ Build and push Docker image
uses: docker/bake-action@v6
uses: docker/bake-action@v7
env:
NODE_VERSION: ${{ matrix.node }}
ALPINE_VERSION: ${{ inputs.alpine_version }}
STREAM: ${{ inputs.stream }}
with:
source: .
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/security-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ jobs:
fail-fast: false
matrix:
image_ref:
- ghcr.io/skpr/node:26-v3-latest
- ghcr.io/skpr/node:dev-26-v3-latest
- ghcr.io/skpr/node:24-v3-latest
- ghcr.io/skpr/node:dev-24-v3-latest
- ghcr.io/skpr/node:22-v3-latest
- ghcr.io/skpr/node:dev-22-v3-latest
- ghcr.io/skpr/node:20-v3-latest
- ghcr.io/skpr/node:dev-20-v3-latest

steps:
- name: 🔑 Log in to the GitHub Container Registry
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ RUN mkdir /data && chown skpr:skpr /data

WORKDIR /data

# Ensure yarn is available before wrapping (Node 26+ no longer ships yarn).
RUN npm install -g yarn --force

# Replace npm with a wrapper script to enforce security.
RUN mv /usr/local/bin/npm /usr/local/bin/npm-unsafe
ADD --chown=skpr:skpr bin/npm-wrapper /usr/local/bin/npm
Expand Down
2 changes: 1 addition & 1 deletion docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ variable "NODE_VERSION" {
}

variable "ALPINE_VERSION" {
default = "3.21"
default = "3.24"
}

variable "STREAM" {
Expand Down