Skip to content

Commit

Permalink
fix(stacks.api): GithubActionRole -> GitHubActionRole
Browse files Browse the repository at this point in the history
this was 4 hours of my life wasted

Signed-off-by: Braden Mars <[email protected]>
  • Loading branch information
BradenM committed Aug 3, 2023
1 parent 8b944b8 commit e4fd9c2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 28 deletions.
41 changes: 15 additions & 26 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,7 @@ jobs:
aws-region: us-east-1
role-duration-seconds: 1800
role-skip-session-tagging: true
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GithubActionRole
- name: Assume CDK Deploy Role
uses: aws-actions/configure-aws-credentials@v1-node16
with:
aws-region: us-east-1
role-duration-seconds: 1800
role-skip-session-tagging: true
aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
aws-session-token: ${{ env.AWS_SESSION_TOKEN }}
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GithubActionRole
role-external-id: Pipeline
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GitHubActionRole
- name: Install
run: >-
n stable
Expand Down Expand Up @@ -99,7 +88,7 @@ jobs:
aws-region: us-east-1
role-duration-seconds: 1800
role-skip-session-tagging: true
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GithubActionRole
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GitHubActionRole
- id: Publish
name: Publish Assets-FileAsset1
run: /bin/bash ./cdk.out/publish-Assets-FileAsset1-step.sh
Expand Down Expand Up @@ -127,7 +116,7 @@ jobs:
aws-region: us-east-1
role-duration-seconds: 1800
role-skip-session-tagging: true
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GithubActionRole
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GitHubActionRole
- id: Publish
name: Publish Assets-FileAsset10
run: /bin/bash ./cdk.out/publish-Assets-FileAsset10-step.sh
Expand Down Expand Up @@ -155,7 +144,7 @@ jobs:
aws-region: us-east-1
role-duration-seconds: 1800
role-skip-session-tagging: true
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GithubActionRole
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GitHubActionRole
- id: Publish
name: Publish Assets-FileAsset11
run: /bin/bash ./cdk.out/publish-Assets-FileAsset11-step.sh
Expand Down Expand Up @@ -183,7 +172,7 @@ jobs:
aws-region: us-east-1
role-duration-seconds: 1800
role-skip-session-tagging: true
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GithubActionRole
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GitHubActionRole
- id: Publish
name: Publish Assets-FileAsset12
run: /bin/bash ./cdk.out/publish-Assets-FileAsset12-step.sh
Expand Down Expand Up @@ -211,7 +200,7 @@ jobs:
aws-region: us-east-1
role-duration-seconds: 1800
role-skip-session-tagging: true
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GithubActionRole
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GitHubActionRole
- id: Publish
name: Publish Assets-FileAsset13
run: /bin/bash ./cdk.out/publish-Assets-FileAsset13-step.sh
Expand Down Expand Up @@ -239,7 +228,7 @@ jobs:
aws-region: us-east-1
role-duration-seconds: 1800
role-skip-session-tagging: true
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GithubActionRole
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GitHubActionRole
- id: Publish
name: Publish Assets-FileAsset2
run: /bin/bash ./cdk.out/publish-Assets-FileAsset2-step.sh
Expand Down Expand Up @@ -267,7 +256,7 @@ jobs:
aws-region: us-east-1
role-duration-seconds: 1800
role-skip-session-tagging: true
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GithubActionRole
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GitHubActionRole
- id: Publish
name: Publish Assets-FileAsset3
run: /bin/bash ./cdk.out/publish-Assets-FileAsset3-step.sh
Expand Down Expand Up @@ -295,7 +284,7 @@ jobs:
aws-region: us-east-1
role-duration-seconds: 1800
role-skip-session-tagging: true
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GithubActionRole
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GitHubActionRole
- id: Publish
name: Publish Assets-FileAsset4
run: /bin/bash ./cdk.out/publish-Assets-FileAsset4-step.sh
Expand Down Expand Up @@ -323,7 +312,7 @@ jobs:
aws-region: us-east-1
role-duration-seconds: 1800
role-skip-session-tagging: true
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GithubActionRole
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GitHubActionRole
- id: Publish
name: Publish Assets-FileAsset5
run: /bin/bash ./cdk.out/publish-Assets-FileAsset5-step.sh
Expand Down Expand Up @@ -351,7 +340,7 @@ jobs:
aws-region: us-east-1
role-duration-seconds: 1800
role-skip-session-tagging: true
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GithubActionRole
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GitHubActionRole
- id: Publish
name: Publish Assets-FileAsset6
run: /bin/bash ./cdk.out/publish-Assets-FileAsset6-step.sh
Expand Down Expand Up @@ -379,7 +368,7 @@ jobs:
aws-region: us-east-1
role-duration-seconds: 1800
role-skip-session-tagging: true
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GithubActionRole
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GitHubActionRole
- id: Publish
name: Publish Assets-FileAsset7
run: /bin/bash ./cdk.out/publish-Assets-FileAsset7-step.sh
Expand Down Expand Up @@ -407,7 +396,7 @@ jobs:
aws-region: us-east-1
role-duration-seconds: 1800
role-skip-session-tagging: true
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GithubActionRole
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GitHubActionRole
- id: Publish
name: Publish Assets-FileAsset8
run: /bin/bash ./cdk.out/publish-Assets-FileAsset8-step.sh
Expand Down Expand Up @@ -435,7 +424,7 @@ jobs:
aws-region: us-east-1
role-duration-seconds: 1800
role-skip-session-tagging: true
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GithubActionRole
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GitHubActionRole
- id: Publish
name: Publish Assets-FileAsset9
run: /bin/bash ./cdk.out/publish-Assets-FileAsset9-step.sh
Expand Down Expand Up @@ -471,7 +460,7 @@ jobs:
aws-region: us-east-1
role-duration-seconds: 1800
role-skip-session-tagging: true
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GithubActionRole
role-to-assume: arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GitHubActionRole
- name: Assume CDK Deploy Role
uses: aws-actions/configure-aws-credentials@v1-node16
with:
Expand Down
4 changes: 2 additions & 2 deletions packages/stacks/api/src/gh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class GithubCodePipeline {
})

const actionsRoleArn =
'arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GithubActionRole'
'arn:aws:iam::${{secrets.AWS_PIPELINE_ACCOUNT_ID}}:role/GitHubActionRole'
const awsCreds = ghpipelines.AwsCredentials.fromOpenIdConnect({
gitHubActionRoleArn: actionsRoleArn,
})
Expand All @@ -219,7 +219,7 @@ class GithubCodePipeline {
awsCreds,
synth,
publishAssetsAuthRegion: 'us-east-1',
preBuildSteps: [...awsCreds.credentialSteps('us-east-1', actionsRoleArn)],
preBuildSteps: [...awsCreds.credentialSteps('us-east-1')],
workflowPath: props.rootDir
? path.join(props.rootDir, '.github', 'workflows', 'deploy.yml')
: undefined,
Expand Down

0 comments on commit e4fd9c2

Please sign in to comment.