[Snyk] Upgrade aws-cdk-lib from 2.154.1 to 2.155.0 #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CDK Deploy | |
on: | |
push: | |
branches: | |
- main # mainブランチへのpushでトリガー | |
pull_request: | |
branches: | |
- main # mainブランチへのPRでトリガー | |
env: | |
AWS_REGION : "ap-northeast-1" | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: read # This is required for actions/checkout | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: linux/arm64 | |
# リポジトリをクローンする | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# AWS の認証 | |
- name: configure aws credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} | |
aws-region: ${{ env.AWS_REGION }} | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
# CDK 環境のセットアップ | |
- name: Install AWS CDK | |
run: bun install --global aws-cdk | |
# 必要な依存関係をインストール | |
- name: Install dependencies | |
run: bun install --yarn | |
# CDK デプロイ | |
- name: Deploy CDK Stack (dev) | |
if: contains(github.event_name, 'pull_request') | |
run: cdk deploy -c env=dev --require-approval never | |
# CDK デプロイ | |
- name: Deploy CDK Stack (prod) | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
run: cdk deploy -c env=prod --require-approval never |