File tree 1 file changed +21
-15
lines changed
1 file changed +21
-15
lines changed Original file line number Diff line number Diff line change 1
- name : Deploy
1
+ name : Build and Push Docker Image
2
2
3
3
on :
4
4
push :
5
5
branches :
6
- - main
6
+ - main
7
7
8
8
jobs :
9
- deploy :
9
+ build-and-push :
10
10
runs-on : ubuntu-latest
11
+
11
12
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 }}
17
24
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
You can’t perform that action at this time.
0 commit comments