Skip to content

Commit 5b9c925

Browse files
committed
Updated the deploy workflow.
1 parent de188ac commit 5b9c925

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ jobs:
6969
run: |
7070
echo "Deploying infrastructure with image: ${{ env.IMAGE_URI }}"
7171
72+
# The secret is formatted as `subnet-xxxx1,subnet-xxxx2` so we have to make sure the CLI recognizes
73+
# it as a comma separated list.
74+
75+
PRIVATE_SUBNETS="${{ secrets.PRIVATE_SUBNETS }}"
76+
PRIVATE_SUBNETS_ESCAPED="${PRIVATE_SUBNETS//,/\\,}"
77+
7278
aws cloudformation deploy \
7379
--template-file infrastructure/cloudformation-template.yaml \
7480
--stack-name ${{ env.STACK_NAME }} \
@@ -80,7 +86,7 @@ jobs:
8086
RDSUsername=${{ secrets.RDS_USERNAME }} \
8187
RDSPassword=${{ secrets.RDS_PASSWORD }} \
8288
VPCId=${{ secrets.VPC_ID }} \
83-
PrivateSubnets=${{ secrets.PRIVATE_SUBNETS }} \
89+
PrivateSubnets=${{ secrets.PRIVATE_SUBNETS_ESCAPED }} \
8490
--capabilities CAPABILITY_NAMED_IAM \
8591
--region ${{ env.AWS_REGION }} \
8692
--no-fail-on-empty-changeset

0 commit comments

Comments
 (0)