Skip to content

Commit 90b29e1

Browse files
committed
lab2
1 parent 92b6b63 commit 90b29e1

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/docker-build.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ name: Build and Push Docker image
33
on:
44
push:
55
branches: [ "main" ]
6+
workflow_dispatch:
67

78
jobs:
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..."

0 commit comments

Comments
 (0)