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 : Docker Build and Push
2+
3+ on :
4+ push :
5+ branches : [ "master" ]
6+ workflow_dispatch :
7+ inputs :
8+ tag :
9+ description : ' Additional tag for the Docker image'
10+ required : false
11+ type : string
12+ default : ' '
13+
14+ env :
15+ DOCKER_HUB_USER : ${{ secrets.DOCKER_HUB_USER }}
16+ DOCKER_HUB_TOKEN : ${{ secrets.DOCKER_HUB_TOKEN }}
17+
18+ jobs :
19+ build :
20+ runs-on : ubuntu-latest
21+ steps :
22+ - name : Checkout code
23+ uses : actions/checkout@v4
24+
25+ - name : Set up Docker Buildx
26+ uses : docker/setup-buildx-action@v3
27+
28+ - name : Login to Docker Hub
29+ uses : docker/login-action@v3
30+ with :
31+ username : ${{ secrets.DOCKER_HUB_USER }}
32+ password : ${{ secrets.DOCKER_HUB_TOKEN }}
33+
34+ - name : Build and push
35+ uses : docker/build-push-action@v5
36+ with :
37+ context : .
38+ push : true
39+ tags : |
40+ betterweb/docker-socket-over-ssh:latest
41+ betterweb/docker-socket-over-ssh:${{ github.sha }}
42+ ${{ github.event.inputs.tag != '' && format('betterweb/docker-socket-over-ssh:{0}', github.event.inputs.tag) || '' }}
You can’t perform that action at this time.
0 commit comments