Skip to content

Commit a1c3fe5

Browse files
authored
Update build-docker.yml
1 parent c49700f commit a1c3fe5

File tree

1 file changed

+21
-15
lines changed

1 file changed

+21
-15
lines changed

.github/workflows/build-docker.yml

+21-15
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,30 @@
1-
name: Deploy
1+
name: Build and Push Docker Image
22

33
on:
44
push:
55
branches:
6-
- main
6+
- main
77

88
jobs:
9-
deploy:
9+
build-and-push:
1010
runs-on: ubuntu-latest
11+
1112
steps:
12-
- name: Login to Docker Hub
13-
uses: docker/login-action@v3
14-
with:
15-
username: ${{ secrets.DOCKER_USERNAME }}
16-
password: ${{ secrets.DOCKER_PASSWORD }}
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
16+
- name: Set up Docker Buildx
17+
uses: docker/setup-buildx-action@v1
18+
19+
- name: Login to Docker Hub
20+
uses: docker/login-action@v1
21+
with:
22+
username: ${{ secrets.DOCKER_USERNAME }}
23+
password: ${{ secrets.DOCKER_PASSWORD }}
1724

18-
- name: Build and push Docker image
19-
uses: docker/build-push-action@v5
20-
with:
21-
push: true
22-
tags: vikram1202/picpilot:latest
23-
# Specify the path to the Dockerfile relative to the root of the repository
24-
dockerfile: Dockerfile
25+
- name: Build and push Docker image
26+
uses: docker/build-push-action@v2
27+
with:
28+
context: .
29+
push: true
30+
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/your-image-name:latest

0 commit comments

Comments
 (0)