This repository was archived by the owner on Jun 24, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 1515 GHCR_REGISTRY : ghcr.io
1616 DOCKERHUB_REGISTRY : docker.io
1717 IMAGE_NAME : ${{ github.repository }}
18+ TEST_TAG : triliumnext/notes:test
1819
1920jobs :
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+
2058 build_docker :
2159 name : Build Docker images
2260 runs-on : ubuntu-latest
61+ needs :
62+ - test_docker
2363 permissions :
2464 contents : read
2565 packages : write
Original file line number Diff line number Diff line change 88 paths-ignore :
99 - " docs/**"
1010 - " bin/**"
11+ - " .github/workflows/main-docker.yml"
1112 tags :
1213 - " v*"
1314 workflow_dispatch :
You can’t perform that action at this time.
0 commit comments