File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build SDK
2+ on :
3+ pull_request :
4+ types : [opened, synchronize, ready_for_review]
5+
6+ concurrency :
7+ group : start-pull-request-build-${{ github.ref }}
8+ cancel-in-progress : true
9+
10+ env :
11+ DOWNLOAD_FOLDER : ' .build-scripts/'
12+ SCRIPT_LOCATION : ' workflows/start-pull-request-build/pull-request-build-v1.sh'
13+
14+ jobs :
15+ aws-sdk-pr-build :
16+ if : github.event.pull_request.draft == false
17+ runs-on : ubuntu-latest
18+ permissions :
19+ id-token : write
20+ issues : write
21+ pull-requests : write
22+ contents : read
23+ steps :
24+ - name : Configure AWS Credentials
25+ uses : aws-actions/configure-aws-credentials@v4
26+ with :
27+ role-to-assume : ${{secrets.PR_WORKFLOW_IAM_ROLE_ARN}}
28+ role-session-name : PullRequestBuildGitHubAction
29+ aws-region : us-west-2
30+ role-duration-seconds : 7200 # 2 hours
31+ - name : Download Build Script
32+ run : |
33+ aws s3 cp s3://aws-sdk-builds-github-assets-prod-us-west-2/$SCRIPT_LOCATION ./$DOWNLOAD_FOLDER/$SCRIPT_LOCATION --no-progress
34+ chmod +x ./$DOWNLOAD_FOLDER/$SCRIPT_LOCATION
35+ - name : Build
36+ env :
37+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
38+ HEAD_REF : ${{ github.event.pull_request.head.ref }}
39+ run : |
40+ ./$DOWNLOAD_FOLDER/$SCRIPT_LOCATION \
41+ --repo "${{ github.repository }}" \
42+ --branch "$HEAD_REF" \
43+ --pr-number "${{ github.event.pull_request.number }}" \
44+ --run-id "${{ github.run_id }}"
45+ timeout-minutes : 120
You can’t perform that action at this time.
0 commit comments