@@ -2,15 +2,19 @@ name: release
2
2
3
3
on :
4
4
push :
5
- tags :
6
- - ' v* '
5
+ tags :
6
+ - " v* "
7
7
8
8
env :
9
- MOVIES_IMAGE_NAME : ' cinema-movies'
9
+ BOOKINGS_IMAGE_NAME : " cinema-bookings"
10
+ MOVIES_IMAGE_NAME : " cinema-movies"
11
+ SHOWTIMES_IMAGE_NAME : " cinema-showtimes"
12
+ USERS_IMAGE_NAME : " cinema-users"
13
+ WEBSITE_IMAGE_NAME : " cinema-website"
10
14
11
15
jobs :
12
16
multi-registries :
13
- name : ' Build'
17
+ name : " Build"
14
18
runs-on : ubuntu-latest
15
19
steps :
16
20
# setups
20
24
uses : docker/setup-buildx-action@v2
21
25
- name : Login to DockerHub
22
26
uses : docker/login-action@v2
23
- with :
27
+ with :
24
28
username : ${{ secrets.DOCKERHUB_USERNAME_2 }}
25
29
password : ${{ secrets.DOCKERHUB_TOKEN_2 }}
26
30
- name : Login to GitHub Container Registry
32
36
- name : Get the version
33
37
id : get_version
34
38
run : echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
35
-
36
- # build and push each microservice release
39
+
40
+ # bookings microservice
41
+ - name : Build and push bookings microservice
42
+ uses : docker/build-push-action@v3
43
+ with :
44
+ push : true
45
+ context : ./bookings
46
+ platforms : linux/amd64,linux/arm/v7,linux/arm64
47
+ file : ./bookings/Dockerfile
48
+ tags : |
49
+ mikebellcoder/${{ env.BOOKINGS_IMAGE_NAME }}:${{ steps.get_version.outputs.VERSION }}
50
+ ghcr.io/mikebellcoder/${{ env.BOOKINGS_IMAGE_NAME }}:${{ steps.get_version.outputs.VERSION }}
51
+
52
+ # movies microservice
37
53
- name : Build and push movies microservice
38
54
uses : docker/build-push-action@v3
39
55
with :
44
60
tags : |
45
61
mikebellcoder/${{ env.MOVIES_IMAGE_NAME }}:${{ steps.get_version.outputs.VERSION }}
46
62
ghcr.io/mikebellcoder/${{ env.MOVIES_IMAGE_NAME }}:${{ steps.get_version.outputs.VERSION }}
63
+
64
+ # showtimes microservice
65
+ - name : Build and push showtimes microservice
66
+ uses : docker/build-push-action@v3
67
+ with :
68
+ push : true
69
+ context : ./showtimes/
70
+ platforms : linux/amd64,linux/arm/v7,linux/arm64
71
+ file : ./showtimes/Dockerfile
72
+ tags : |
73
+ mikebellcoder/${{ env.SHOWTIMES_IMAGE_NAME }}:${{ steps.get_version.outputs.VERSION }}
74
+ ghcr.io/mikebellcoder/${{ env.SHOWTIMES_IMAGE_NAME }}:${{ steps.get_version.outputs.VERSION }}
75
+
76
+ # users microservice
77
+ - name : Build and push users microservice
78
+ uses : docker/build-push-action@v3
79
+ with :
80
+ push : true
81
+ context : ./users/
82
+ platforms : linux/amd64,linux/arm/v7,linux/arm64
83
+ file : ./users/Dockerfile
84
+ tags : |
85
+ mikebellcoder/${{ env.USERS_IMAGE_NAME }}:${{ steps.get_version.outputs.VERSION }}
86
+ ghcr.io/mikebellcoder/${{ env.USERS_IMAGE_NAME }}:${{ steps.get_version.outputs.VERSION }}
87
+
88
+ # website microservice
89
+ - name : Build and push website microservice
90
+ uses : docker/build-push-action@v3
91
+ with :
92
+ push : true
93
+ context : ./website/
94
+ platforms : linux/amd64,linux/arm/v7,linux/arm64
95
+ file : ./website/Dockerfile
96
+ tags : |
97
+ mikebellcoder/${{ env.WEBSITE_IMAGE_NAME }}:${{ steps.get_version.outputs.VERSION }}
98
+ ghcr.io/mikebellcoder/${{ env.WEBSITE_IMAGE_NAME }}:${{ steps.get_version.outputs.VERSION }}
0 commit comments