-
-
Notifications
You must be signed in to change notification settings - Fork 20
97 lines (91 loc) · 2.4 KB
/
docker-build-push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: ci
on:
push:
branches:
- main
jobs:
main:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Install npm dependencies
run: npm ci
-
name: cds build
run: npm run build
-
name: build db
run: ./pg-build.sh
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
push: true
platforms:
linux/amd64
tags:
gregorwolf/pg-beershop:latest
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
-
name: Build and push db deployer
id: docker_build_db
uses: docker/build-push-action@v3
with:
context: .
file: db-deployer-kubernetes/Dockerfile
push: true
tags:
gregorwolf/pg-beershop-db:latest
-
name: Image digest
run: echo ${{ steps.docker_build_db.outputs.digest }}
-
name: Build and push UI
id: docker_build_ui
uses: docker/build-push-action@v3
with:
context: app
push: true
tags:
gregorwolf/pg-beershop-ui:latest
-
name: Image digest
run: echo ${{ steps.docker_build_ui.outputs.digest }}
## Not possible until https://github.com/docker/hub-tool/issues/172 is solved
# -
# name: Publish Readme
# id: publish_readme
# uses: meeDamian/[email protected]
# with:
# user: ${{ secrets.DOCKERHUB_USERNAME }}
# pass: ${{ secrets.DOCKERHUB_TOKEN }}
# slug: gregorwolf/pg-beershop
# readme: ./docker/description.md
# description: CAP Beershop using PostgreSQL for persistence