From ce03a9b081c1da42ebd5580760eacfd172527666 Mon Sep 17 00:00:00 2001 From: sg Date: Mon, 24 Jun 2024 14:42:28 -0500 Subject: [PATCH] update environment based deploy --- README.md | 4 ++-- lib/github-actions-role-stack.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7890960..7a87cd2 100644 --- a/README.md +++ b/README.md @@ -30,9 +30,9 @@ These instructions will get you a copy of this project up and running in your ow 1. Open the `github-actions-role-stack.ts` file. 2. Add this codes repository that you created to the `allowedRepositories` array in the `github-actions-role-stack.ts` file. - - Use this template: `'repo:USER_OR_ORG_NAME/THIS_PROJECTS_REPO:*'` + - Use this template: `'repo:USER_OR_ORG_NAME/THIS_PROJECTS_REPO:environment:*'` 3. Add any repos you want to allow to be deployed via Github actions, new line for each repo to the `allowedRepositories` array in the `github-actions-role-stack.ts` file. - - Use this template: `repo:USER_OR_ORG_NAME/REPO:*'` + - Use this template: `repo:USER_OR_ORG_NAME/REPO:environment:*'` ### Bootstrap the project with CDK 1. From your local machine, bootstrap the project. diff --git a/lib/github-actions-role-stack.ts b/lib/github-actions-role-stack.ts index 4d7b39b..5f7c97d 100644 --- a/lib/github-actions-role-stack.ts +++ b/lib/github-actions-role-stack.ts @@ -21,7 +21,7 @@ export class GithubActionsRoleStack extends cdk.Stack { 'token.actions.githubusercontent.com:sub': [ // Sets the Username/Organization, Repo, that AWS will allow to be deployed from. // Only the specific repo will be allowed, using temporary keys with OIDC. - // 'repo:/:*' + // 'repo:/:environment:*' 'repo:sghost13/gh-aws-deploy-oidc:environment:*' ] },