Skip to content

Commit

Permalink
fix: changed build-context to list
Browse files Browse the repository at this point in the history
  • Loading branch information
ytqsl committed Feb 12, 2024
1 parent b5f86ae commit 84113af
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-ess-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: ./.github/workflows/build-template.yml
with:
IMAGE_CONTEXT: ess/src/API
BUILD_CONTEXT: "['shared=../../../shared/src']"
BUILD_CONTEXT: "shared=../../../shared/src"
IMAGE_FILE: ess/src/API/Dockerfile
IMAGE_NAME: ess-backend
REGISTRY: ${{ vars.DOCKER_REGISTRY }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-registrants-portal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: ./.github/workflows/build-template.yml
with:
IMAGE_CONTEXT: registrants/src/API
BUILD_CONTEXT: "['shared=../../../shared/src']"
BUILD_CONTEXT: "shared=../../../shared/src"
IMAGE_FILE: registrants/src/API/Dockerfile
IMAGE_NAME: registrants-portal-api
REGISTRY: ${{ vars.DOCKER_REGISTRY }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-responders-portal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: ./.github/workflows/build-template.yml
with:
IMAGE_CONTEXT: responders/src/API
BUILD_CONTEXT: "['shared=../../../shared/src']"
BUILD_CONTEXT: "shared=../../../shared/src"
IMAGE_FILE: responders/src/API/Dockerfile
IMAGE_NAME: responders-portal-api
REGISTRY: ${{ vars.DOCKER_REGISTRY }}
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/build-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
BUILD_CONTEXT:
required: false
type: string
default: "[]"
default: ""
IMAGE_FILE:
required: true
type: string
Expand Down Expand Up @@ -67,8 +67,7 @@ jobs:
uses: docker/build-push-action@v5
with:
context: ${{ inputs.IMAGE_CONTEXT }}
build-contexts: |
${{ fromJson(inputs.BUILD_CONTEXT) }}
build-contexts: ${{ inputs.BUILD_CONTEXT }}
file: ${{ inputs.IMAGE_FILE }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
Expand Down

0 comments on commit 84113af

Please sign in to comment.