File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : release
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' v*'
7
+
8
+ env :
9
+ REGISTRY : ghcr.io
10
+ MOVIES_IMAGE_NAME : ' cinema-movies'
11
+
12
+ jobs :
13
+ multi-registries :
14
+ name : ' Build'
15
+ runs-on : ubuntu-latest
16
+ steps :
17
+ # setups
18
+ - name : Checkout
19
+ uses : actions/checkout@v4
20
+ - name : Set up Docker Buildx
21
+ uses : docker/setup-buildx-action@v2
22
+ - name : Login to GitHub Container Registry
23
+ uses : docker/login-action@v2
24
+ with :
25
+ registry : ghcr.io
26
+ username : ${{ github.repository_owner }}
27
+ password : ${{ secrets.CR_PAT }}
28
+ - name : Get the version
29
+ id : get_version
30
+ run : echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
31
+
32
+ # build and push each microservice release
33
+ - name : Build and push movies microservice
34
+ uses : docker/build-push-action@v3
35
+ with :
36
+ push : true
37
+ context : ./movies/
38
+ platforms : linux/amd64,linux/arm/v7,linux/arm64
39
+ file : ./movies/Dockerfile
40
+ tags : |
41
+ mikebellcoder/${{ env.MOVIES_IMAGE_NAME }}:${{ steps.get_version.outputs.VERSION }}
42
+ ghcr.io/mikebellcoder/${{ env.MOVIES_IMAGE_NAME }}:${{ steps.get_version.outputs.VERSION }}
You can’t perform that action at this time.
0 commit comments