File tree 2 files changed +41
-0
lines changed
2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 15
15
GHCR_REGISTRY : ghcr.io
16
16
DOCKERHUB_REGISTRY : docker.io
17
17
IMAGE_NAME : ${{ github.repository }}
18
+ TEST_TAG : triliumnext/notes:test
18
19
19
20
jobs :
21
+ test_docker :
22
+ name : Check Docker build
23
+ runs-on : ubuntu-latest
24
+ steps :
25
+ - name : Checkout the repository
26
+ uses : actions/checkout@v4
27
+
28
+ - name : Set up Docker Buildx
29
+ uses : docker/setup-buildx-action@v3
30
+
31
+ - name : Set up node & dependencies
32
+ uses : actions/setup-node@v4
33
+ with :
34
+ node-version : 20
35
+ cache : " npm"
36
+
37
+ - run : npm ci
38
+
39
+ - name : Run the TypeScript build
40
+ run : npx tsc
41
+
42
+ - name : Create server-package.json
43
+ run : cat package.json | grep -v electron > server-package.json
44
+
45
+ - name : Build and export to Docker
46
+ uses : docker/build-push-action@v6
47
+ with :
48
+ context : .
49
+ load : true
50
+ tags : ${{ env.TEST_TAG }}
51
+ cache-from : type=gha
52
+ cache-to : type=gha,mode=max
53
+
54
+ - name : Run the container
55
+ run : |
56
+ docker run --rm ${{ env.TEST_TAG }}
57
+
20
58
build_docker :
21
59
name : Build Docker images
22
60
runs-on : ubuntu-latest
61
+ needs :
62
+ - test_docker
23
63
permissions :
24
64
contents : read
25
65
packages : write
Original file line number Diff line number Diff line change 8
8
paths-ignore :
9
9
- " docs/**"
10
10
- " bin/**"
11
+ - " .github/workflows/main-docker.yml"
11
12
tags :
12
13
- " v*"
13
14
workflow_dispatch :
You can’t perform that action at this time.
0 commit comments