Skip to content

Commit

Permalink
Update dev-user.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Sheetal-ayanworks <[email protected]>
  • Loading branch information
Sheetal-ayanworks authored Apr 5, 2024
1 parent ece12f0 commit 3b22c9f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/dev-user.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,14 @@ jobs:
FAMILY=$(sed -n 's/.*"family": "\(.*\)",/\1/p' taskdef/user-service.json)
NAME=$(sed -n 's/.*"name": "\(.*\)",/\1/p' taskdef/user-service.json)
SERVICE_NAME="${NAME}-service"
sed -e "s;%BUILD_NUMBER%;${{ github.run_number }};g" -e "s;%REPOSITORY_URI%;${REPOSITORY_URI};g" taskdef/user-service.json > ${GITHUB_WORKSPACE}/${NAME}-v_${{ github.run_number }}.json
cat ${GITHUB_WORKSPACE}/${NAME}-v_${{ github.run_number }}.json
aws ecs register-task-definition --family ${FAMILY} --cli-input-json file://${GITHUB_WORKSPACE}/${NAME}-v_${{ github.run_number }}.json --region ${{ env.AWS_REGION }}
# Replace placeholders in the JSON file
sed -e "s;%BUILD_NUMBER%;${{ github.run_number }};g" -e "s;%REPOSITORY_URI%;${REPOSITORY_URI};g" taskdef/user-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

# Register the task definition using the modified JSON file
aws ecs register-task-definition --family ${FAMILY} --cli-input-json file://${GITHUB_WORKSPACE}/${NAME}-v_${{ github.run_number }}.json --region ${{ env.AWS_REGION }}



0 comments on commit 3b22c9f

Please sign in to comment.