File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Docker Build and Push
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' v*'
7
+ workflow_dispatch :
8
+ inputs :
9
+ tag :
10
+ description : ' Tag to build (e.g., v1.2.0)'
11
+ required : true
12
+ type : string
13
+
14
+ env :
15
+ DOCKERHUB_USERNAME : ${{ secrets.DOCKERHUB_USERNAME }}
16
+ IMAGE_NAME : evm-loadbalancer
17
+
18
+ jobs :
19
+ build :
20
+ runs-on : ubuntu-latest
21
+ steps :
22
+ - name : Checkout
23
+ uses : actions/checkout@v4
24
+ with :
25
+ ref : ${{ github.event.inputs.tag || github.ref }}
26
+
27
+ - name : Set up Docker Buildx
28
+ uses : docker/setup-buildx-action@v3
29
+
30
+ - name : Login to Docker Hub
31
+ uses : docker/login-action@v3
32
+ with :
33
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
34
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
35
+
36
+ - name : Build and Push
37
+ uses : docker/build-push-action@v5
38
+ with :
39
+ context : .
40
+ platforms : linux/amd64,linux/arm64
41
+ push : true
42
+ tags : |
43
+ ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${{ github.event.inputs.tag || github.ref_name }}
44
+ ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest
You can’t perform that action at this time.
0 commit comments