fix: docker images

This commit is contained in:
hazre committed 2026-03-12 00:31:27 +01:00
1 parent a27595b51b
commit e44ee39b5e
5 files changed
+21 -11

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@ inputs:
install-command:
description: Command used to install dependencies.
required: false
default: pnpm install --frozen-lockfile --ignore-scripts
default: pnpm install --frozen-lockfile
build:
description: Whether to build the app after installing dependencies.
required: false
+7 -3
View File
@@ -5,6 +5,10 @@ on:
branches: [dev]
tags:
- 'sable/v*'
pull_request:
paths:
- 'Dockerfile'
- '.github/workflows/docker-publish.yml'
env:
REGISTRY: ghcr.io
@@ -27,6 +31,7 @@ jobs:
persist-credentials: false
- name: Log in to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
registry: ${{ env.REGISTRY }}
@@ -68,8 +73,6 @@ jobs:
- name: Setup app
uses: ./.github/actions/setup
with:
install-command: pnpm install --frozen-lockfile --ignore-scripts
- name: Build site
env:
@@ -89,7 +92,7 @@ jobs:
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
with:
context: .
push: true
push: ${{ github.event_name != 'pull_request' }}
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
@@ -99,6 +102,7 @@ jobs:
site-dist=./dist
- name: Generate artifact attestation
if: github.event_name != 'pull_request'
uses: actions/attest-build-provenance@a2bbfa25375fe432b6a289bc6b6cd05ecd0c4c32 # v4.1.0
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
+3 -2
View File
@@ -3,6 +3,7 @@ FROM --platform=$BUILDPLATFORM node:24.13.1-alpine AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
RUN apk add --no-cache git
## Builder
FROM base AS builder
@@ -13,10 +14,10 @@ ARG VITE_BUILD_HASH
ARG VITE_IS_RELEASE_TAG=false
ENV VITE_BUILD_HASH=$VITE_BUILD_HASH
ENV VITE_IS_RELEASE_TAG=$VITE_IS_RELEASE_TAG
COPY pnpm-lock.yaml /src/
COPY pnpm-lock.yaml pnpm-workspace.yaml /src/
RUN pnpm fetch
COPY . /src/
RUN pnpm install --offline --frozen-lockfile --ignore-scripts
RUN pnpm install --offline --frozen-lockfile
ENV NODE_OPTIONS=--max_old_space_size=4096
RUN pnpm run build
+5
View File
@@ -115,6 +115,11 @@ function isPathWithin(candidatePath, rootPath) {
const logger = new PrefixedLogger('[postinstall:knope]');
const { dim, red, green } = createTextHelpers({ useColor: logger.useColor });
if (process.env.GITHUB_ACTIONS && process.env.CI) {
logger.info(`${dim('Running in CI environment, skipping knope installation')}`);
process.exit(0);
}
const target = TARGETS[`${process.platform}-${process.arch}`];
if (!target) {
const supported = Object.keys(TARGETS).join(', ');
+5 -5
View File
@@ -93,14 +93,14 @@ const copyFiles = {
const require = createRequire(import.meta.url);
function serverMatrixSdkCryptoWasm() {
const resolvedPath = path.join(
path.dirname(require.resolve('@matrix-org/matrix-sdk-crypto-wasm')),
'pkg/matrix_sdk_crypto_wasm_bg.wasm'
);
return {
name: 'vite-plugin-serve-matrix-sdk-crypto-wasm',
configureServer(server: ViteDevServer) {
const resolvedPath = path.join(
path.dirname(require.resolve('@matrix-org/matrix-sdk-crypto-wasm')),
'pkg/matrix_sdk_crypto_wasm_bg.wasm'
);
server.middlewares.use((req, res, next) => {
if (!req.url?.endsWith('matrix_sdk_crypto_wasm_bg.wasm')) {
next();