From b5bbdcdf92aa97022da205de2432fd9e4cb917e5 Mon Sep 17 00:00:00 2001 From: Yenfry Herrera Feliz Date: Wed, 15 Apr 2026 07:31:24 -0700 Subject: [PATCH 1/4] chore: GH preview builds integration --- .github/workflows/pull-request-build.yaml | 55 +++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/pull-request-build.yaml diff --git a/.github/workflows/pull-request-build.yaml b/.github/workflows/pull-request-build.yaml new file mode 100644 index 0000000000..982b0ab91d --- /dev/null +++ b/.github/workflows/pull-request-build.yaml @@ -0,0 +1,55 @@ +name: Build SDK +on: + pull_request_review: + types: [ submitted ] + branches: [ main ] + +concurrency: + group: start-pull-request-build-${{ github.ref }} + cancel-in-progress: true + +env: + # constants + DOWNLOAD_FOLDER: '.build-scripts/' + SCRIPT_LOCATION: 'workflows/start-pull-request-build/pull-request-build-v1.sh' + + # custom variables + IAM_ROLE_ARN: 'ROLE_ARN' + ROLE_SESSION_DURATION_SECONDS: 7200 + +jobs: + aws-sdk-pr-build: + if: github.event.review.state == 'approved' + runs-on: ubuntu-latest + permissions: + id-token: write + issues: write + pull-requests: write + contents: read + steps: + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@main + with: + role-to-assume: '$IAM_ROLE_ARN' + role-session-name: PullRequestBuildGitHubAction + role-duration-seconds: '$ROLE_SESSION_DURATION_SECONDS' + aws-region: us-west-2 + - name: Download Build Script + run: | + aws s3 cp s3://aws-sdk-builds-github-assets-prod-us-west-2/$SCRIPT_LOCATION ./$DOWNLOAD_FOLDER/$SCRIPT_LOCATION --no-progress + chmod +x ./$DOWNLOAD_FOLDER/$SCRIPT_LOCATION + - name: Build + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO: ${{ github.repository }} + HEAD_REF: ${{ github.event.pull_request.head.ref }} + PR_NUMBER: ${{ github.event.pull_request.number }} + RUN_ID: ${{ github.run_id }} + run: | + ./$DOWNLOAD_FOLDER/$SCRIPT_LOCATION \ + --repo "$REPO" \ + --branch "$HEAD_REF" \ + --pr-number "$PR_NUMBER" \ + --run-id "$RUN_ID" + timeout-minutes: 120 + From 1e18db3cf9cd4b5581830a5acbcc929a37ac02cd Mon Sep 17 00:00:00 2001 From: Yenfry Herrera Feliz Date: Thu, 16 Apr 2026 07:20:58 -0700 Subject: [PATCH 2/4] chore: use secrets for workflow role --- .github/workflows/pull-request-build.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pull-request-build.yaml b/.github/workflows/pull-request-build.yaml index 982b0ab91d..19c27add06 100644 --- a/.github/workflows/pull-request-build.yaml +++ b/.github/workflows/pull-request-build.yaml @@ -14,7 +14,6 @@ env: SCRIPT_LOCATION: 'workflows/start-pull-request-build/pull-request-build-v1.sh' # custom variables - IAM_ROLE_ARN: 'ROLE_ARN' ROLE_SESSION_DURATION_SECONDS: 7200 jobs: @@ -30,7 +29,7 @@ jobs: - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@main with: - role-to-assume: '$IAM_ROLE_ARN' + role-to-assume: ${{secrets.PR_WORKFLOW_IAM_ROLE_ARN}} role-session-name: PullRequestBuildGitHubAction role-duration-seconds: '$ROLE_SESSION_DURATION_SECONDS' aws-region: us-west-2 From 6c0ee4d35c0774d20f8d3b4367222a95fe6d3fc6 Mon Sep 17 00:00:00 2001 From: Yenfry Herrera Feliz Date: Thu, 16 Apr 2026 15:05:02 -0700 Subject: [PATCH 3/4] chore: minor fixes --- .github/workflows/pull-request-build.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pull-request-build.yaml b/.github/workflows/pull-request-build.yaml index 19c27add06..fbf24a7fb0 100644 --- a/.github/workflows/pull-request-build.yaml +++ b/.github/workflows/pull-request-build.yaml @@ -2,7 +2,7 @@ name: Build SDK on: pull_request_review: types: [ submitted ] - branches: [ main ] + branches: [ master ] concurrency: group: start-pull-request-build-${{ github.ref }} @@ -27,11 +27,11 @@ jobs: contents: read steps: - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@main + uses: aws-actions/configure-aws-credentials@v4 with: - role-to-assume: ${{secrets.PR_WORKFLOW_IAM_ROLE_ARN}} + role-to-assume: ${{ vars.PR_WORKFLOW_IAM_ROLE_ARN }} role-session-name: PullRequestBuildGitHubAction - role-duration-seconds: '$ROLE_SESSION_DURATION_SECONDS' + role-duration-seconds: ${{ env.ROLE_SESSION_DURATION_SECONDS }} aws-region: us-west-2 - name: Download Build Script run: | From f32cf1ce2cc11a90c1ad8da78b2134103f435a06 Mon Sep 17 00:00:00 2001 From: Sean O'Brien Date: Tue, 21 Apr 2026 18:11:13 -0400 Subject: [PATCH 4/4] trigger CI --- ...l-request-build.yaml => pull-request-build.yml} | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) rename .github/workflows/{pull-request-build.yaml => pull-request-build.yml} (82%) diff --git a/.github/workflows/pull-request-build.yaml b/.github/workflows/pull-request-build.yml similarity index 82% rename from .github/workflows/pull-request-build.yaml rename to .github/workflows/pull-request-build.yml index fbf24a7fb0..c5a0bba708 100644 --- a/.github/workflows/pull-request-build.yaml +++ b/.github/workflows/pull-request-build.yml @@ -1,7 +1,7 @@ name: Build SDK on: - pull_request_review: - types: [ submitted ] + pull_request: + types: [opened, synchronize, ready_for_review] branches: [ master ] concurrency: @@ -13,12 +13,9 @@ env: DOWNLOAD_FOLDER: '.build-scripts/' SCRIPT_LOCATION: 'workflows/start-pull-request-build/pull-request-build-v1.sh' - # custom variables - ROLE_SESSION_DURATION_SECONDS: 7200 - jobs: aws-sdk-pr-build: - if: github.event.review.state == 'approved' + if: github.event.pull_request.draft == false runs-on: ubuntu-latest permissions: id-token: write @@ -29,9 +26,9 @@ jobs: - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: - role-to-assume: ${{ vars.PR_WORKFLOW_IAM_ROLE_ARN }} + role-to-assume: ${{ secrets.PR_WORKFLOW_IAM_ROLE_ARN }} role-session-name: PullRequestBuildGitHubAction - role-duration-seconds: ${{ env.ROLE_SESSION_DURATION_SECONDS }} + role-duration-seconds: 7200 aws-region: us-west-2 - name: Download Build Script run: | @@ -51,4 +48,3 @@ jobs: --pr-number "$PR_NUMBER" \ --run-id "$RUN_ID" timeout-minutes: 120 -