Skip to content

ci: move to oidc

ci: move to oidc #28

Workflow file for this run

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]
with:
aws-region: ${{ secrets.CDK_DEPLOY_REGION }}
role-to-assume: ${{ secrets.AWS_ROLE }}
role-session-name: ${{ secrets.AWS_SESSION_NAME }}
- 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