diff --git a/.github/workflows/bootstrap_region.yml b/.github/workflows/bootstrap_region.yml index 630921edbd..a9d7db8bcd 100644 --- a/.github/workflows/bootstrap_region.yml +++ b/.github/workflows/bootstrap_region.yml @@ -34,14 +34,23 @@ permissions: contents: read jobs: - cdk: - name: Install CDK + bootstrap: + name: Bootstrap Region runs-on: ubuntu-latest permissions: - contents: write id-token: write environment: layer-${{ inputs.environment }} steps: + - name: checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + ref: ${{ github.sha }} + - name: Setup Node.js + uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 + with: + node-version: "22" + - name: Setup dependencies + uses: aws-powertools/actions/.github/actions/cached-node-modules@29979bc5339bf54f76a11ac36ff67701986bb0f0 - id: credentials name: AWS Credentials uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 @@ -53,11 +62,6 @@ jobs: name: Create Workdir run: | mkdir -p build/project - - id: cdk-install - name: Install CDK - working-directory: build - run: | - npm i aws-cdk@2.178.0 - id: cdk-project name: CDK Project working-directory: build/project @@ -68,8 +72,8 @@ jobs: copy_layers: name: Copy Layers runs-on: ubuntu-latest + needs: bootstrap permissions: - contents: write id-token: write environment: layer-${{ inputs.environment }} steps: @@ -90,7 +94,7 @@ jobs: run: go env - id: go-install-pkg name: Install - run: go install github.com/aws-powertools/actions/layer-balancer/cmd/balance@latest + run: go install github.com/aws-powertools/actions/layer-balancer/cmd/balance@@29979bc5339bf54f76a11ac36ff67701986bb0f0 - id: run-balance name: Run Balance - run: balance -read-region us-east-1 -write-region ${{ inputs.region }} -write-role ${{ secrets.BALANCE_ROLE_ARN }} -layer-name AWSLambdaPowertoolsTypeScriptV2 -dry-run=false \ No newline at end of file + run: balance -read-region us-east-1 -write-region ${{ inputs.region }} -write-role ${{ secrets.BALANCE_ROLE_ARN }} -layer-name AWSLambdaPowertoolsTypeScriptV2 -dry-run=false