File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5757 parse-json-secrets : true
5858 - run : npm ci
5959 - run : npm run build
60+ - name : Generate GitHub App Token
61+ if : matrix.cdk-source == 'main'
62+ id : app-token
63+ uses : actions/create-github-app-token@v1
64+ with :
65+ app-id : ${{ vars.APP_ID }}
66+ private-key : ${{ secrets.APP_PRIVATE_KEY }}
67+ owner : aws
6068 - name : Build CDK package from main
6169 if : matrix.cdk-source == 'main'
6270 run : |
6775 TARBALL=$(npm pack --pack-destination "$RUNNER_TEMP" | tail -1)
6876 echo "CDK_TARBALL=$RUNNER_TEMP/$TARBALL" >> "$GITHUB_ENV"
6977 env :
70- CDK_REPO_TOKEN : ${{ secrets.CDK_REPO_TOKEN }}
78+ CDK_REPO_TOKEN : ${{ steps.app-token.outputs.token }}
7179 CDK_REPO : ${{ secrets.CDK_REPO_NAME }}
7280 - name : Install CLI globally
7381 run : npm install -g "$(npm pack | tail -1)"
Original file line number Diff line number Diff line change 7979 E2E,${{ secrets.E2E_SECRET_ARN }}
8080 parse-json-secrets : true
8181
82+ - name : Generate GitHub App Token
83+ id : app-token
84+ uses : actions/create-github-app-token@v1
85+ with :
86+ app-id : ${{ vars.APP_ID }}
87+ private-key : ${{ secrets.APP_PRIVATE_KEY }}
88+ owner : aws
8289 # Build @aws/agentcore-cdk from source for cross-package testing.
83- # Requires secrets : CDK_REPO_NAME (org/repo), CDK_REPO_TOKEN (fine-grained PAT)
90+ # Requires secret : CDK_REPO_NAME (org/repo). Token is generated by the App above.
8491 - name : Build CDK package
8592 run : |
8693 CDK_BRANCH="${{ inputs.cdk_branch || 'main' }}"
9299 TARBALL=$(npm pack --pack-destination "$RUNNER_TEMP" | tail -1)
93100 echo "CDK_TARBALL=$RUNNER_TEMP/$TARBALL" >> "$GITHUB_ENV"
94101 env :
95- CDK_REPO_TOKEN : ${{ secrets.CDK_REPO_TOKEN }}
102+ CDK_REPO_TOKEN : ${{ steps.app-token.outputs.token }}
96103 CDK_REPO : ${{ secrets.CDK_REPO_NAME }}
97104
98105 - run : npm ci
You can’t perform that action at this time.
0 commit comments