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
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches: [dev]
tags:
- 'sable/v*'
pull_request:
paths:
- 'Dockerfile'
- '.github/workflows/docker-publish.yml'

env:
REGISTRY: ghcr.io
Expand All @@ -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 }}
Expand Down Expand Up @@ -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:
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
5 changes: 5 additions & 0 deletions scripts/install-knope.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(', ');
Expand Down
10 changes: 5 additions & 5 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Loading