Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit 147c340

Browse files
committed
Merge remote-tracking branch 'origin/develop' into port/client_ts
2 parents 87e6871 + b91b243 commit 147c340

File tree

338 files changed

+8899
-2513
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

338 files changed

+8899
-2513
lines changed

.github/actions/build-electron/action.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ inputs:
66
description: "The architecture to build for: x64, arm64"
77
required: true
88
extension:
9-
description: "Platform specific extensions to copy in the output: dmg, deb, rpm, exe"
9+
description: "Platform specific extensions to copy in the output: dmg, deb, rpm, exe, zip"
1010
required: true
1111
runs:
1212
using: composite
@@ -27,16 +27,12 @@ runs:
2727
- name: Install dependencies
2828
shell: bash
2929
run: npm ci
30-
- name: Temporary Flatpak arm64 workaround till https://github.com/electron/forge/pull/3839 is merged
31-
if: ${{ inputs.os == 'linux' && inputs.arch == 'arm64' }}
32-
shell: bash
33-
run: sed -e "s/case 'armv7l'/case 'arm64'/g" -e "s/return 'arm'/return 'aarch64'/g" -i node_modules/@electron-forge/maker-flatpak/dist/MakerFlatpak.js
3430
- name: Update build info
3531
shell: bash
36-
run: npm run update-build-info
32+
run: npm run chore:update-build-info
3733
- name: Run electron-forge
3834
shell: bash
39-
run: npm run make-electron -- --arch=${{ inputs.arch }}
35+
run: npm run electron-forge:make -- --arch=${{ inputs.arch }}
4036
- name: Prepare artifacts
4137
shell: bash
4238
run: |

.github/actions/build-server/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
inputs:
2+
os:
3+
description: "One of the supported platforms: windows"
4+
required: true
25
arch:
36
description: "The architecture to build for: x64, arm64"
47
required: true
@@ -18,7 +21,7 @@ runs:
1821
MATRIX_ARCH: ${{ inputs.arch }}
1922
shell: bash
2023
run: |
21-
npm run update-build-info
24+
npm run chore:update-build-info
2225
./bin/build-server.sh
2326
- name: Prepare artifacts
2427
shell: bash

.github/workflows/main-docker.yml

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
steps:
3434
- name: Checkout the repository
3535
uses: actions/checkout@v4
36-
36+
3737
- name: Set IMAGE_NAME to lowercase
3838
run: echo "IMAGE_NAME=${IMAGE_NAME,,}" >> $GITHUB_ENV
3939
- name: Set TEST_TAG to lowercase
@@ -47,16 +47,16 @@ jobs:
4747
with:
4848
node-version: 20
4949
cache: "npm"
50-
50+
5151
- name: Install npm dependencies
5252
run: npm ci
5353

5454
- name: Install Playwright Browsers
5555
run: npx playwright install --with-deps
56-
56+
5757
- name: Run the TypeScript build
5858
run: npx tsc
59-
59+
6060
- name: Create server-package.json
6161
run: cat package.json | grep -v electron > server-package.json
6262

@@ -69,20 +69,20 @@ jobs:
6969
tags: ${{ env.TEST_TAG }}
7070
cache-from: type=gha
7171
cache-to: type=gha,mode=max
72-
72+
7373
- name: Validate container run output
7474
run: |
7575
CONTAINER_ID=$(docker run -d --log-driver=journald --rm --network=host -e TRILIUM_PORT=8082 --volume ./integration-tests/db:/home/node/trilium-data --name trilium_local ${{ env.TEST_TAG }})
7676
echo "Container ID: $CONTAINER_ID"
77-
77+
7878
- name: Wait for the healthchecks to pass
7979
uses: stringbean/docker-healthcheck-action@v3
8080
with:
8181
container: trilium_local
8282
wait-time: 50
8383
require-status: running
8484
require-healthy: true
85-
85+
8686
- name: Run Playwright tests
8787
run: TRILIUM_DOCKER=1 npx playwright test
8888
- uses: actions/upload-artifact@v4
@@ -100,24 +100,27 @@ jobs:
100100
101101
build:
102102
name: Build Docker images
103-
runs-on: ubuntu-latest
104-
needs:
105-
- test_docker
106-
permissions:
107-
contents: read
108-
packages: write
109-
attestations: write
110-
id-token: write
111103
strategy:
112104
fail-fast: false
113105
matrix:
114106
include:
115107
- dockerfile: Dockerfile.alpine
116108
platform: linux/amd64
109+
image: ubuntu-latest
117110
- dockerfile: Dockerfile
118111
platform: linux/arm64
112+
image: ubuntu-24.04-arm
119113
- dockerfile: Dockerfile
120114
platform: linux/arm/v7
115+
image: ubuntu-24.04-arm
116+
runs-on: ${{ matrix.image }}
117+
needs:
118+
- test_docker
119+
permissions:
120+
contents: read
121+
packages: write
122+
attestations: write
123+
id-token: write
121124
steps:
122125
- name: Prepare
123126
run: |
@@ -144,13 +147,13 @@ jobs:
144147
type=sha
145148
flavor: |
146149
latest=false
147-
150+
148151
- name: Set up QEMU
149152
uses: docker/setup-qemu-action@v3
150-
153+
151154
- name: Set up Docker Buildx
152155
uses: docker/setup-buildx-action@v3
153-
156+
154157

155158
- name: Set up node & dependencies
156159
uses: actions/setup-node@v4
@@ -169,14 +172,14 @@ jobs:
169172
registry: ${{ env.GHCR_REGISTRY }}
170173
username: ${{ github.actor }}
171174
password: ${{ secrets.GITHUB_TOKEN }}
172-
175+
173176
- name: Login to DockerHub
174177
uses: docker/login-action@v3
175178
with:
176179
registry: ${{ env.DOCKERHUB_REGISTRY }}
177180
username: ${{ secrets.DOCKERHUB_USERNAME }}
178181
password: ${{ secrets.DOCKERHUB_TOKEN }}
179-
182+
180183
- name: Build and push by digest
181184
id: build
182185
uses: docker/build-push-action@v6
@@ -186,13 +189,13 @@ jobs:
186189
platforms: ${{ matrix.platform }}
187190
labels: ${{ steps.meta.outputs.labels }}
188191
outputs: type=image,name=${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true
189-
192+
190193
- name: Export digest
191194
run: |
192195
mkdir -p /tmp/digests
193196
digest="${{ steps.build.outputs.digest }}"
194197
touch "/tmp/digests/${digest#sha256:}"
195-
198+
196199
- name: Upload digest
197200
uses: actions/upload-artifact@v4
198201
with:
@@ -220,7 +223,7 @@ jobs:
220223

221224
- name: Set up Docker Buildx
222225
uses: docker/setup-buildx-action@v3
223-
226+
224227
- name: Docker meta
225228
id: meta
226229
uses: docker/metadata-action@v5
@@ -237,14 +240,14 @@ jobs:
237240
registry: ${{ env.GHCR_REGISTRY }}
238241
username: ${{ github.actor }}
239242
password: ${{ secrets.GITHUB_TOKEN }}
240-
243+
241244
- name: Login to DockerHub
242245
uses: docker/login-action@v3
243246
with:
244247
registry: ${{ env.DOCKERHUB_REGISTRY }}
245248
username: ${{ secrets.DOCKERHUB_USERNAME }}
246249
password: ${{ secrets.DOCKERHUB_TOKEN }}
247-
250+
248251
- name: Create manifest list and push
249252
working-directory: /tmp/digests
250253
run: |
@@ -255,7 +258,7 @@ jobs:
255258
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
256259
-t ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}:${REF_NAME} \
257260
$(printf '${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)
258-
261+
259262
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
260263
-t ${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:${REF_NAME} \
261264
$(printf '${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)
@@ -267,25 +270,25 @@ jobs:
267270
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
268271
-t ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}:stable \
269272
$(printf '${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)
270-
273+
271274
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
272275
-t ${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:stable \
273276
$(printf '${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *)
274-
277+
275278
# Small delay to ensure stable tag is fully propagated
276279
sleep 5
277-
280+
278281
# Now update latest tags
279282
docker buildx imagetools create \
280283
-t ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}:latest \
281284
${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}:stable
282-
285+
283286
docker buildx imagetools create \
284287
-t ${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:latest \
285288
${{ env.DOCKERHUB_REGISTRY }}/${{ env.IMAGE_NAME }}:stable
286-
289+
287290
fi
288-
291+
289292
- name: Inspect image
290293
run: |
291294
docker buildx imagetools inspect ${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }}

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
extension: [deb, rpm, zip, flatpak]
3030
- name: windows
3131
image: windows-latest
32-
extension: exe
32+
extension: [exe, zip]
3333
runs-on: ${{ matrix.os.image }}
3434
steps:
3535
- uses: actions/checkout@v4

.github/workflows/nightly.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
extension: [deb, rpm, zip, flatpak]
2727
- name: windows
2828
image: windows-latest
29-
extension: exe
29+
extension: [exe, zip]
3030
runs-on: ${{ matrix.os.image }}
3131
steps:
3232
- uses: actions/checkout@v4
@@ -38,7 +38,7 @@ jobs:
3838
shell: bash
3939
run: npm ci
4040
- name: Update nightly version
41-
run: npm run ci-update-nightly-version
41+
run: npm run chore:ci-update-nightly-version
4242
- name: Run the build
4343
uses: ./.github/actions/build-electron
4444
with:
@@ -75,6 +75,7 @@ jobs:
7575
- name: Run the build
7676
uses: ./.github/actions/build-server
7777
with:
78+
os: linux
7879
arch: ${{ matrix.arch }}
7980

8081
- name: Publish release

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
extension: [deb, rpm, zip, flatpak]
2727
- name: windows
2828
image: windows-latest
29-
extension: exe
29+
extension: [exe, zip]
3030
runs-on: ${{ matrix.os.image }}
3131
steps:
3232
- uses: actions/checkout@v4
@@ -65,6 +65,7 @@ jobs:
6565
- name: Run the build
6666
uses: ./.github/actions/build-server
6767
with:
68+
os: linux
6869
arch: ${{ matrix.arch }}
6970

7071
- name: Publish release

.gitpod.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ image:
44
tasks:
55
- before: nvm install 20.15.1 && nvm use 20.15.1
66
init: npm install
7-
command: npm run start-server
7+
command: npm run server:start
88

99
ports:
1010
- port: 8080

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
{
66
"console": "integratedTerminal",
77
"internalConsoleOptions": "neverOpen",
8-
"name": "nodemon start-server",
9-
"program": "${workspaceFolder}/src/www",
8+
"name": "nodemon server:start",
9+
"program": "${workspaceFolder}/src/main",
1010
"request": "launch",
1111
"restart": true,
1212
"runtimeExecutable": "nodemon",

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@
1818
"github-actions.workflows.pinned.workflows": [".github/workflows/nightly.yml"],
1919
"[css]": {
2020
"editor.defaultFormatter": "vscode.css-language-features"
21-
}
21+
},
22+
"npm.exclude": ["**/build", "**/dist", "**/out/**"]
2223
}

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build stage
2-
FROM node:22.13.1-bullseye-slim AS builder
2+
FROM node:22.14.0-bullseye-slim AS builder
33

44
# Configure build dependencies in a single layer
55
RUN apt-get update && apt-get install -y --no-install-recommends \
@@ -25,7 +25,7 @@ RUN cp -R build/src/* src/. && \
2525
cp build/docker_healthcheck.js . && \
2626
rm docker_healthcheck.ts && \
2727
npm install && \
28-
npm run webpack && \
28+
npm run build:webpack && \
2929
npm prune --omit=dev && \
3030
npm cache clean --force && \
3131
cp -r src/public/app/doc_notes src/public/app-dist/. && \
@@ -36,7 +36,7 @@ RUN cp -R build/src/* src/. && \
3636
rm -r build
3737

3838
# Runtime stage
39-
FROM node:22.13.1-bullseye-slim
39+
FROM node:22.14.0-bullseye-slim
4040

4141
# Install only runtime dependencies
4242
RUN apt-get update && apt-get install -y --no-install-recommends \

0 commit comments

Comments
 (0)