Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): use gh environment for beta and prod layer deploy #1356

Merged
merged 1 commit into from
Jul 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/publish_layer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ jobs:
with:
stage: "BETA"
artefact-name: "cdk-layer-artefact"
secrets:
target-account-role: ${{ secrets.AWS_LAYERS_BETA_ROLE_ARN }}
environment: "layer-beta"

deploy-prod:
needs:
Expand All @@ -77,5 +76,4 @@ jobs:
with:
stage: "PROD"
artefact-name: "cdk-layer-artefact"
secrets:
target-account-role: ${{ secrets.AWS_LAYERS_PROD_ROLE_ARN }}
environment: "layer-prod"
6 changes: 5 additions & 1 deletion .github/workflows/reusable_deploy_layer_stack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ on:
artefact-name:
required: true
type: string
environment:
required: true
type: string
secrets:
target-account-role:
required: true

jobs:
deploy-cdk-stack:
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
defaults:
run:
working-directory: ./layer
Expand Down Expand Up @@ -58,7 +62,7 @@ jobs:
uses: aws-actions/configure-aws-credentials@v1
with:
aws-region: ${{ matrix.region }}
role-to-assume: ${{ secrets.target-account-role }}
role-to-assume: ${{ secrets.AWS_LAYERS_ROLE_ARN }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
Expand Down