File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -3,13 +3,13 @@ name: Build and Push Docker image
33on :
44 push :
55 branches : [ "main" ]
6+ workflow_dispatch :
67
78jobs :
89 build :
910 runs-on : ubuntu-latest
10-
1111 steps :
12- - name : Checkout repository
12+ - name : Checkout
1313 uses : actions/checkout@v4
1414
1515 - name : Set up Docker Buildx
@@ -18,16 +18,21 @@ jobs:
1818 - name : Login to Docker Hub
1919 uses : docker/login-action@v3
2020 with :
21+ registry : docker.io
2122 username : ${{ secrets.DOCKER_USERNAME }}
2223 password : ${{ secrets.DOCKER_PASSWORD }}
2324
24- - name : Build and push image to Docker Hub
25+ - name : Verify login
26+ run : docker whoami
27+
28+ - name : Build and push
2529 uses : docker/build-push-action@v5
2630 with :
2731 context : .
2832 file : ./Dockerfile
33+ pull : true
2934 push : true
30- tags : sblrok03/lab2:latest
35+ tags : docker.io/ sblrok03/lab2:latest
3136
3237 - name : Deploy (placeholder)
3338 run : echo "Deploying application..."
You can’t perform that action at this time.
0 commit comments