File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Release Docker Image
2
+
3
+ on :
4
+ release :
5
+ types : [published]
6
+
7
+ jobs :
8
+ build-and-push :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Checkout code
12
+ uses : actions/checkout@v4
13
+
14
+ - name : Set up Docker Buildx
15
+ uses : docker/setup-buildx-action@v3
16
+
17
+ - name : Log in to Docker Hub
18
+ uses : docker/login-action@v3
19
+ with :
20
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
21
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
22
+
23
+ - name : Extract version tag without 'v'
24
+ id : set_tag
25
+ run : echo "tag=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
26
+
27
+ - name : Build and push Docker image
28
+ uses : docker/build-push-action@v5
29
+ with :
30
+ context : .
31
+ file : ./Dockerfile
32
+ push : true
33
+ tags : |
34
+ yhirose4dockerhub/cpp-httplib-server:latest
35
+ yhirose4dockerhub/cpp-httplib-server:${{ steps.set_tag.outputs.tag }}
You can’t perform that action at this time.
0 commit comments