File tree 1 file changed +37
-0
lines changed
1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish Docker image
2
+
3
+ on :
4
+ release :
5
+ types : [published]
6
+
7
+ env :
8
+ REGISTRY : " crashntech/${{ github.event.repository.name }}"
9
+
10
+ jobs :
11
+ build_and_push :
12
+ name : Push Docker image to Docker Hub
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - name : Check out the repo
16
+ uses : actions/checkout@v4
17
+
18
+ - name : Log in to Docker Hub
19
+ uses : docker/login-action@v3
20
+ with :
21
+ username : ${{ secrets.REGISTRY_USERNAME }}
22
+ password : ${{ secrets.REGISTRY_TOKEN }}
23
+
24
+ - name : Extract metadata (tags, labels) for Docker
25
+ id : meta
26
+ uses : docker/metadata-action@v5
27
+ with :
28
+ images : ${{ env.REGISTRY }}
29
+
30
+ - name : Build and push Docker image
31
+ uses : docker/build-push-action@v5
32
+ with :
33
+ context : .
34
+ file : ./Dockerfile
35
+ push : true
36
+ tags : ${{ steps.meta.outputs.tags }}
37
+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments