Merge pull request #1388 from aws-observability/dependabot/npm_and_ya… #1
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: Deploy cdk infra | |
on: | |
workflow_dispatch: | |
push: | |
branches: ['terraform'] | |
# List of paths that should be considered when triggering the workflow | |
paths: ['cdk_infra/**'] | |
permissions: | |
id-token: write | |
contents: read | |
concurrency: | |
group: cdk_infra_deploy | |
cancel-in-progress: false | |
jobs: | |
run-cdk-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
role-to-assume: ${{ secrets.TEST_FW_ASSUMABLE_ROLE_ARN }} | |
aws-region: us-west-2 | |
role-duration-seconds: 21600 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Get npm cache directory | |
id: npm-cache-dir | |
run: | | |
echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
id: npm-cache | |
with: | |
path: ${{ steps.npm-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: npm install | |
working-directory: cdk_infra | |
run: | | |
npm install | |
- name: run cdk deploy | |
working-directory: cdk_infra | |
run: | | |
make deploy-infra |