Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/pull-request-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build SDK
on:
pull_request_review:
types: [ submitted ]
branches: [ main ]

concurrency:
group: start-pull-request-build-${{ github.ref }}
cancel-in-progress: true

env:
IAM_ROLE_ARN: 'arn:aws:iam::088667348242:role/AwsSdkJsV3GitHubRole'
DOWNLOAD_FOLDER: '.build-scripts/'
SCRIPT_LOCATION: 'workflows/start-pull-request-build/pull-request-build-v1.sh'

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@v4
with:
role-to-assume: ${{ env.IAM_ROLE_ARN }}
role-session-name: PullRequestBuildGitHubAction
aws-region: us-west-2
role-duration-seconds: 7200
- 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 }}
HEAD_REF: ${{ github.event.pull_request.head.ref }}
run: |
./$DOWNLOAD_FOLDER/$SCRIPT_LOCATION \
--repo "${{ github.repository }}" \
--branch "$HEAD_REF" \
--pr-number "${{ github.event.pull_request.number }}" \
--run-id "${{ github.run_id }}"
timeout-minutes: 120 # 2 hours
Loading