diff --git a/.github/workflows/dev-api-gateway.yml b/.github/workflows/dev-api-gateway.yml index b05035c36..cf8b099e7 100644 --- a/.github/workflows/dev-api-gateway.yml +++ b/.github/workflows/dev-api-gateway.yml @@ -7,9 +7,9 @@ on: # paths: # - 'apps/api-gateway/**' # workflow_dispatch: - + env: - ECR_IMAGE_TAG: "API-GATEWAY_V_${{ github.run_number }}" + ECR_IMAGE_TAG: "AGENT_V_${{ github.run_number }}" ECR_REPOSITORY: "dev-services" AWS_REGION: "ap-southeast-1" CLUSTER: "DEV-NGOTAG-CLUSTER" @@ -42,7 +42,7 @@ jobs: env: ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }} ECR_REPOSITORY: dev-services - IMAGE_TAG: "API-GATEWAY_V_${{ github.run_number }}" + IMAGE_TAG: "AGENT_V_${{ github.run_number }}" run: | docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f Dockerfiles/Dockerfile.api-gateway . docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG @@ -52,7 +52,7 @@ jobs: run: | echo "ECR_REGISTRY=${{ steps.login-ecr.outputs.registry }}" >> $GITHUB_ENV echo "ECR_REPOSITORY=dev-services" >> $GITHUB_ENV - echo "IMAGE_TAG=API-GATEWAY_V_${{ github.run_number }}" >> $GITHUB_ENV + echo "IMAGE_TAG=AGENT_V_${{ github.run_number }}" >> $GITHUB_ENV - name: Print environment variables run: | @@ -71,13 +71,13 @@ jobs: - name: Update Task Definition and service run: | - FAMILY=$(sed -n 's/.*"family": "\(.*\)",/\1/p' taskdef/agent-service.json) - NAME=$(sed -n 's/.*"name": "\(.*\)",/\1/p' taskdef/agent-service.json) + FAMILY=$(sed -n 's/.*"family": "\(.*\)",/\1/p' taskdef/api-gateway-service.json) + NAME=$(sed -n 's/.*"name": "\(.*\)",/\1/p' taskdef/api-gateway-service.json) SERVICE_NAME="${NAME}-service" echo "SERVICE_NAME: $SERVICE_NAME" # Replace placeholders in the JSON file - sed -e "s;%BUILD_NUMBER%;${{ github.run_number }};g" -e "s;%REPOSITORY_URI%;${REPOSITORY_URI};g" taskdef/agent-service.json > ${GITHUB_WORKSPACE}/${NAME}-v_${{ github.run_number }}.json + sed -e "s;%BUILD_NUMBER%;${{ github.run_number }};g" -e "s;%REPOSITORY_URI%;${REPOSITORY_URI};g" taskdef/api-gateway-service.json > ${GITHUB_WORKSPACE}/${NAME}-v_${{ github.run_number }}.json # Debug: Print the content of the modified JSON file cat ${GITHUB_WORKSPACE}/${NAME}-v_${{ github.run_number }}.json