File tree 1 file changed +40
-0
lines changed
1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ name : Create and publish the Docker image
3
+
4
+ on :
5
+ push :
6
+ branches : ['master']
7
+
8
+ env :
9
+ IMAGE_NAME : ghcr.io/eokoe/email-db-service
10
+
11
+ jobs :
12
+ build-and-push-image :
13
+ runs-on : ubuntu-latest
14
+ permissions :
15
+ contents : read
16
+ packages : write
17
+
18
+ steps :
19
+ - name : Checkout repository
20
+ uses : actions/checkout@v3
21
+
22
+ - name : Login to Github Container Registry
23
+ uses : docker/login-action@v2
24
+ with :
25
+ registry : ghcr.io
26
+ username : ${{ github.actor }}
27
+ password : ${{ secrets.GITHUB_TOKEN }}
28
+
29
+ - name : Set up Docker Buildx
30
+ uses : docker/setup-buildx-action@v1
31
+
32
+ - name : Build and push
33
+ uses : docker/build-push-action@v2
34
+ with :
35
+ context : ./
36
+ file : ./Dockerfile
37
+ push : true
38
+ tags : ${{ env.IMAGE_NAME }}:latest,${{ env.IMAGE_NAME }}:${{ github.sha }}
39
+ cache-from : type=registry,ref=${{ env.IMAGE_NAME }}:latest
40
+ cache-to : type=inline
You can’t perform that action at this time.
0 commit comments