From 321af1bbf9dfbe3bf51a59d381656c2d26a84a63 Mon Sep 17 00:00:00 2001 From: Harrison Weinstock Date: Fri, 22 May 2026 16:55:29 +0000 Subject: [PATCH] ci: fix prerelease workflow git credentials for CDK clone --- .github/workflows/prerelease-tarball.yml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/prerelease-tarball.yml b/.github/workflows/prerelease-tarball.yml index c0d41f9f9..c50d1b64f 100644 --- a/.github/workflows/prerelease-tarball.yml +++ b/.github/workflows/prerelease-tarball.yml @@ -16,6 +16,7 @@ concurrency: jobs: prerelease-tarball: runs-on: ubuntu-latest + timeout-minutes: 15 steps: - uses: actions/checkout@v6 - uses: actions/setup-node@v6 @@ -23,18 +24,27 @@ jobs: node-version: '20.x' cache: 'npm' - uses: astral-sh/setup-uv@v7 - - run: npm run bundle - - name: Get tarball info - id: tarball - run: | - TARBALL_NAME=$(ls *.tgz | head -1 | xargs basename) - echo "name=$TARBALL_NAME" >> $GITHUB_OUTPUT - name: Generate GitHub App Token id: app-token uses: actions/create-github-app-token@v1 with: app-id: ${{ vars.APP_ID }} private-key: ${{ secrets.APP_PRIVATE_KEY }} + owner: aws + - name: Clone CDK repo + run: | + git clone --depth 1 "https://x-access-token:${CDK_REPO_TOKEN}@github.com/${CDK_REPO}.git" /tmp/cdk-repo + env: + CDK_REPO_TOKEN: ${{ steps.app-token.outputs.token }} + CDK_REPO: ${{ secrets.CDK_REPO_NAME }} + - run: npm run bundle + env: + AGENTCORE_CDK_PATH: /tmp/cdk-repo + - name: Get tarball info + id: tarball + run: | + TARBALL_NAME=$(ls *.tgz | head -1 | xargs basename) + echo "name=$TARBALL_NAME" >> $GITHUB_OUTPUT - name: Create or update prerelease env: GH_TOKEN: ${{ steps.app-token.outputs.token }}