File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 6
6
jobs :
7
7
build :
8
8
runs-on : ubuntu-latest
9
+ strategy :
10
+ matrix :
11
+ image : [backend, clickhouse]
9
12
steps :
10
13
- run : echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
11
14
@@ -22,18 +25,18 @@ jobs:
22
25
username : ${{ github.actor }}
23
26
password : ${{ secrets.GITHUB_TOKEN }}
24
27
25
- - name : Build and push
26
- id : docker_build
28
+ - name : Build and push (${{ matrix.image }})
29
+ id : build-image
27
30
uses : docker/build-push-action@v5
28
31
with :
29
32
push : true
30
33
tags : |
31
- ghcr.io/talodev/backend :latest
32
- ghcr.io/talodev/backend :${{ env.TAG }}
33
- target : prod
34
+ ghcr.io/talodev/${{ matrix.image }} :latest
35
+ ghcr.io/talodev/${{ matrix.image }} :${{ env.TAG }}
36
+ target : ${{ matrix.image == 'backend' && ' prod' || '' }}
34
37
35
- - name : Image digest
36
- run : echo ${{ steps.docker_build .outputs.digest }}
38
+ - name : Image digest (${{ matrix.image }})
39
+ run : echo ${{ steps.build-image .outputs.digest }}
37
40
38
41
deploy :
39
42
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ COPY src ./src
16
16
RUN npm run build
17
17
18
18
FROM base AS prod
19
- ENV NODE_ENV production
19
+ ENV NODE_ENV= production
20
20
RUN npm ci
21
21
COPY --from=build /usr/backend/dist .
22
22
CMD [ "node" , "index.js" ]
You can’t perform that action at this time.
0 commit comments