diff --git a/.github/workflows/build-and-push-dev.yml b/.github/workflows/build-and-push-dev.yml index 11a56a8..d6bf62a 100644 --- a/.github/workflows/build-and-push-dev.yml +++ b/.github/workflows/build-and-push-dev.yml @@ -11,6 +11,7 @@ env: AR_REGION: asia-southeast1 REPOSITORY: icy IMAGE_NAME: backend + K8S_ENVIRONMENT: dev jobs: build-and-push: @@ -61,7 +62,7 @@ jobs: ref: main - name: Update api version run: | - cd ./infrastructure/icy/backend/$K8S_ENVIRONMENT + cd ./infrastructure/icy/backend/${{ env.K8S_ENVIRONMENT }} git config user.name lmquang git config user.email quanglm.ops@gmail.com /tmp/kustomize edit set image ${{ env.AR_REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.IMAGE_NAME }}=${{ env.AR_REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} diff --git a/.github/workflows/build-and-push-prod.yml b/.github/workflows/build-and-push-prod.yml index 2414d6c..9bac5da 100644 --- a/.github/workflows/build-and-push-prod.yml +++ b/.github/workflows/build-and-push-prod.yml @@ -10,7 +10,8 @@ env: AR_REGION: asia-southeast1 REPOSITORY: icy IMAGE_NAME: backend - + K8S_ENVIRONMENT: prod + jobs: build-and-push: runs-on: ubuntu-latest @@ -60,7 +61,7 @@ jobs: ref: main - name: Update api version run: | - cd ./infrastructure/icy/backend/$K8S_ENVIRONMENT + cd ./infrastructure/icy/backend/${{ env.K8S_ENVIRONMENT }} git config user.name lmquang git config user.email quanglm.ops@gmail.com /tmp/kustomize edit set image ${{ env.AR_REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.IMAGE_NAME }}=${{ env.AR_REGION }}-docker.pkg.dev/${{ env.PROJECT_ID }}/${{ env.REPOSITORY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}