File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : CI Pipeline
1+ name : CI Build and Push
22
33on :
44 push :
5- branches : [ "main" ]
6- workflow_dispatch :
5+ branches : [ main ]
76
87env :
98 REGISTRY : docker.io
1312jobs :
1413 build-and-push :
1514 runs-on : ubuntu-latest
15+
1616 steps :
1717 - name : Checkout code
1818 uses : actions/checkout@v3
1919
20- - name : Log in to Docker Hub
21- uses : docker/login-action@v2
20+ - name : Set up Docker Buildx
21+ uses : docker/setup-buildx-action@v3
22+
23+ - name : Log in to DockerHub
24+ uses : docker/login-action@v3
2225 with :
23- username : ${{ secrets.DOCKERHUB_USERNAME }}
24- password : ${{ secrets.DOCKERHUB_TOKEN }}
26+ username : ${{ secrets.DOCKER_USERNAME }}
27+ password : ${{ secrets.DOCKER_PASSWORD }}
2528
26- - name : Build and push Backend image
29+ - name : Build and push backend
2730 uses : docker/build-push-action@v5
2831 with :
2932 context : ./backend
33+ file : ./backend/Dockerfile
3034 push : true
3135 tags : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_BACKEND }}:latest
3236
33- - name : Build and push Frontend image
37+ - name : Build and push frontend
3438 uses : docker/build-push-action@v5
3539 with :
3640 context : ./frontend
41+ file : ./frontend/Dockerfile
3742 push : true
3843 tags : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_FRONTEND }}:latest
You can’t perform that action at this time.
0 commit comments