diff --git a/.github/workflows/stage-issuance.yml b/.github/workflows/stage-issuance.yml index 10eb3db60..d27aacb54 100644 --- a/.github/workflows/stage-issuance.yml +++ b/.github/workflows/stage-issuance.yml @@ -72,7 +72,7 @@ jobs: run: | FAMILY=$(sed -n 's/.*"family": "\(.*\)",/\1/p' stage-taskdef/issuance-service.json) NAME=$(sed -n 's/.*"name": "\(.*\)",/\1/p' stage-taskdef/issuance-service.json) - SERVICE_NAME="${NAME}_service" + SERVICE_NAME="${NAME}-service" # Replace placeholders in the JSON file sed -e "s;%BUILD_NUMBER%;${{ github.run_number }};g" -e "s;%REPOSITORY_URI%;${REPOSITORY_URI};g" stage-taskdef/issuance-service.json > ${GITHUB_WORKSPACE}/${NAME}-v_${{ github.run_number }}.json @@ -99,4 +99,4 @@ jobs: # Update the existing service REVISION=$(aws ecs describe-task-definition --task-definition ${FAMILY} --region ap-southeast-1 | jq -r '.taskDefinition.revision') aws ecs update-service --cluster ${CLUSTER} --region ap-southeast-1 --service ${SERVICE_NAME} --task-definition ${FAMILY}:${REVISION} --desired-count ${DESIRED_COUNT} - fi \ No newline at end of file + fi diff --git a/.github/workflows/stage-verification.yml b/.github/workflows/stage-verification.yml index fff5ef178..b7d943eb2 100644 --- a/.github/workflows/stage-verification.yml +++ b/.github/workflows/stage-verification.yml @@ -72,7 +72,7 @@ jobs: NAME=$(sed -n 's/.*"name": "\(.*\)",/\1/p' stage-taskdef/verification-service.json) SERVICE_NAME="${NAME}-service" - # Replace placeholders in the JSON file + # Replace placeholders in the JSON file sed -e "s;%BUILD_NUMBER%;${{ github.run_number }};g" -e "s;%REPOSITORY_URI%;${REPOSITORY_URI};g" stage-taskdef/verification-service.json > ${GITHUB_WORKSPACE}/${NAME}-v_${{ github.run_number }}.json # Debug: Print the content of the modified JSON file @@ -95,6 +95,7 @@ jobs: DESIRED_COUNT="1" fi # Update the existing service + DESIRED_COUNT="1" REVISION=$(aws ecs describe-task-definition --task-definition ${FAMILY} --region ap-southeast-1 | jq -r '.taskDefinition.revision') aws ecs update-service --cluster ${CLUSTER} --region ap-southeast-1 --service ${SERVICE_NAME} --task-definition ${FAMILY}:${REVISION} --desired-count ${DESIRED_COUNT} - fi \ No newline at end of file + fi