Skip to content

Commit

Permalink
fix docker context issue
Browse files Browse the repository at this point in the history
  • Loading branch information
riteshsonawane1372 committed Oct 11, 2024
1 parent 67ea22a commit 61e6aa6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build-push-ecr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ on:
branches: [ "main" ]

env:
Dockerfile-Backend: Dockerfile
Dockerfile-Web: web/Dockerfile
Dockerfile_Backend: Dockerfile
Dockerfile_Web: web/Dockerfile
jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -38,12 +38,12 @@ jobs:
run: |
VERSION_TAG=$(echo "${{ github.ref }}" | cut -d'/' -f 3)
TAG=$ECR_REGISTRY/$ECR_REPOSITORY:${VERSION_TAG}
docker build --platform linux/amd64 --push -t ${TAG} -f ${Dockerfile-Backend} .
docker build --platform linux/amd64 --push -t ${TAG} -f ${{ env.Dockerfile_Backend }} .
- name: Build Backend image
if: github.event_name == 'pull_request'
run: |
docker build --platform linux/amd64 -f ${Dockerfile-Backend} .
docker build --platform linux/amd64 -f ${{ env.Dockerfile_Backend }} .
- name: Build Web and and push
Expand All @@ -54,12 +54,12 @@ jobs:
run: |
VERSION_TAG=$(echo "${{ github.ref }}" | cut -d'/' -f 3)
TAG=$ECR_REGISTRY/$ECR_REPOSITORY:${VERSION_TAG}
docker build --platform linux/amd64 --push -t ${TAG} -f ${Dockerfile-Web} .
docker build --platform linux/amd64 --push -t ${TAG} -f ${{ env.Dockerfile_Web }} web/
- name: Build Web image
if: github.event_name == 'pull_request'
run: |
docker build --platform linux/amd64 -f ${Dockerfile-Web} .
docker build --platform linux/amd64 -f ${{ env.Dockerfile_Web }} web/
Expand Down

0 comments on commit 61e6aa6

Please sign in to comment.