-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (50 loc) · 1.78 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Build
on:
pull_request: {}
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/[email protected]
- name: Install Node.js
run: |
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
- name: Install pnpm and dependencies
run: |
corepack enable
corepack prepare pnpm@latest --activate
pnpm install
- name: Cache NPM dependencies
uses: actions/[email protected]
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
# - name: Assume role using OIDC
# uses: aws-actions/[email protected]
# env:
# AWS_REGION: ${{ secrets.CDK_DEPLOY_REGION }}
# with:
# role-to-assume: arn:aws:iam::346733622331:role/cdk-hnb659fds-lookup-role-346733622331-us-east-1
# aws-region: $AWS_REGION
- name: Assume role using AWS credentials
uses: aws-actions/[email protected]
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.CDK_DEPLOY_REGION }}
- name: Run build
env:
CDK_DEPLOY_ACCOUNT: ${{ secrets.CDK_DEPLOY_ACCOUNT }}
CDK_DEPLOY_REGION: ${{ secrets.CDK_DEPLOY_REGION }}
CDK_DEFAULT_ACCOUNT: ${{ secrets.CDK_DEFAULT_ACCOUNT }}
CDK_DEFAULT_REGION: ${{ secrets.CDK_DEFAULT_REGION }}
AWS_REGION: ${{ secrets.CDK_DEPLOY_REGION }}
run: pnpm run diff