Skip to content

Commit

Permalink
fix(stacks.web): add environment conditionals per stage
Browse files Browse the repository at this point in the history
Signed-off-by: Braden Mars <bradenmars@bradenmars.me>
  • Loading branch information
BradenM committed Sep 23, 2023
1 parent adfb7c2 commit 8128735
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/deploy-crisiscleanup-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ jobs:
echo -n "$targets" | xargs -r -d',' -t -n1 -P2 /bin/bash
development-crisiscleanup-web-deploy:
name: Deploy developmentcrisiscleanupweb9069437F
if: github.inputs == "development"
permissions:
contents: read
id-token: write
Expand Down Expand Up @@ -235,6 +236,7 @@ jobs:
role-arn: arn:aws:iam::${{secrets.AWS_ACCOUNT_ID_DEVELOPMENT}}:role/cdk-hnb659fds-cfn-exec-role-${{secrets.AWS_ACCOUNT_ID_DEVELOPMENT}}-us-east-1
staging-crisiscleanup-web-deploy:
name: Deploy stagingcrisiscleanupweb1118F9DE
if: github.inputs == "staging"
permissions:
contents: read
id-token: write
Expand Down Expand Up @@ -282,6 +284,7 @@ jobs:
role-arn: arn:aws:iam::${{secrets.AWS_ACCOUNT_ID_STAGING}}:role/cdk-hnb659fds-cfn-exec-role-${{secrets.AWS_ACCOUNT_ID_STAGING}}-us-east-1
production-crisiscleanup-web-deploy:
name: Deploy productioncrisiscleanupwebED01140D
if: github.inputs == "production"
permissions:
contents: read
id-token: write
Expand Down
15 changes: 15 additions & 0 deletions packages/stacks/web/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ pipeline.addStageWithGitHubOptions(
},
},
),
{
jobSettings: {
if: 'github.inputs == "development"',
},
},
)
pipeline.addStageWithGitHubOptions(
new CrisisCleanupWebStage(
Expand All @@ -168,6 +173,11 @@ pipeline.addStageWithGitHubOptions(
},
},
),
{
jobSettings: {
if: 'github.inputs == "staging"',
},
},
)
pipeline.addStageWithGitHubOptions(
new CrisisCleanupWebStage(
Expand All @@ -186,6 +196,11 @@ pipeline.addStageWithGitHubOptions(
},
},
),
{
jobSettings: {
if: 'github.inputs == "production"',
},
},
)

app.synth()

0 comments on commit 8128735

Please sign in to comment.