@@ -11,13 +11,47 @@ jobs:
11
11
steps :
12
12
- name : Checkout
13
13
uses : actions/checkout@v4
14
+ with :
15
+ fetch-depth : 2
14
16
15
17
- uses : ./.github/actions/node-setup
16
18
17
- - name : Copy env
18
- run : cp .env.example .env
19
+ - uses : ./.github/actions/build-app
19
20
20
- - name : Build
21
- run : npm i && npm run build
22
- env :
23
- SKIP_ENV_VALIDATION : " 1"
21
+ build_docker :
22
+ name : Build Docker Image
23
+ runs-on : ubuntu-latest
24
+ steps :
25
+ - name : Checkout
26
+ uses : actions/checkout@v4
27
+ with :
28
+ fetch-depth : 2
29
+
30
+ - name : Set up Docker Buildx
31
+ uses : docker/setup-buildx-action@v3
32
+
33
+ - name : Cache Docker layers
34
+ uses : actions/cache@v4
35
+ with :
36
+ path : /tmp/.buildx-cache
37
+ key : ${{ runner.os }}-buildx-${{ github.sha }}
38
+ restore-keys : |
39
+ ${{ runner.os }}-buildx-
40
+
41
+ - name : Build Docker Image
42
+ uses : docker/build-push-action@v5
43
+ with :
44
+ push : false
45
+ context : .
46
+ file : ./docker/Dockerfile
47
+ tags : captable-${{ github.sha }}
48
+ cache-from : type=local,src=/tmp/.buildx-cache
49
+ cache-to : type=local,dest=/tmp/.buildx-cache-new,mode=max
50
+
51
+ - # Temp fix
52
+ # https://github.com/docker/build-push-action/issues/252
53
+ # https://github.com/moby/buildkit/issues/1896
54
+ name : Move cache
55
+ run : |
56
+ rm -rf /tmp/.buildx-cache
57
+ mv /tmp/.buildx-cache-new /tmp/.buildx-cache
0 commit comments