Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,19 @@ 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 }}
with:
source: .
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
22 changes: 16 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,36 @@ 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: .
push: ${{ inputs.push }}
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
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ RUN apk add --no-cache \
curl \
g++ \
git \
jq \
make \
openssh-client \
python3 \
rsync \
tar \
# Below are for packages such as https://www.npmjs.com/package/imagemin
autoconf \
Expand All @@ -29,7 +31,7 @@ RUN apk add --no-cache \
util-linux \
vips-dev

RUN export SKPRMAIL_VERSION=1.0.1 && \
RUN export SKPRMAIL_VERSION=1.0.3 && \
curl -sSL https://github.com/skpr/mail/releases/download/v${SKPRMAIL_VERSION}/skprmail_${SKPRMAIL_VERSION}_linux_${TARGETARCH} -o /usr/local/bin/skprmail && \
chmod +rx /usr/local/bin/skprmail

Expand All @@ -39,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
4 changes: 2 additions & 2 deletions tests.bats
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ setup() {
assert_output --partial "DISCLAIMER"
}

@test "pnpm --help exits 0 and mentions 'compiled to binary'" {
@test "pnpm --help exits 0 and mentions 'Usage: pnpm [command] [flags]'" {
run pnpm --help
[ "$status" -eq 0 ]
assert_output --partial "compiled to binary"
assert_output --partial "Usage: pnpm [command] [flags]"
}
Loading