From 77095207a6a49c1c33141703771c57a971208716 Mon Sep 17 00:00:00 2001 From: Sotatek-TuLe2 Date: Tue, 7 Jan 2025 14:58:35 +0700 Subject: [PATCH] add NEXT_PUBLIC_API_URL step --- .github/workflows/ci-kairos.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-kairos.yml b/.github/workflows/ci-kairos.yml index a035e2b..832a688 100644 --- a/.github/workflows/ci-kairos.yml +++ b/.github/workflows/ci-kairos.yml @@ -6,7 +6,7 @@ on: - feat/add-dockerfile-and-CI jobs: - deploy: + build-and-push-image-to-ECR: permissions: id-token: write contents: read @@ -36,7 +36,10 @@ jobs: ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} ECR_REPOSITORY: ${{ vars.ECR_REPOSITORY_KAIROS }} IMAGE_TAG: ${{ steps.vars.outputs.hash }} + API_URL: ${{ vars.KAIROS_API_URL }} run: | + echo "NEXT_PUBLIC_API_URL= $API_URL" > .env.production + cat .env.production docker build -f dockerfile --build-arg VERSION=$IMAGE_TAG -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . docker push $ECR_REGISTRY/$ECR_REPOSITORY -a