Skip to content

Commit 5d1acc9

Browse files
committed
removed simple-build steps
hardcode IAM role
1 parent 3086f2a commit 5d1acc9

File tree

2 files changed

+7
-44
lines changed

2 files changed

+7
-44
lines changed

.github/workflows/pull-request-build.yaml.yml renamed to .github/workflows/pull-request-build.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,10 @@ concurrency:
1010

1111
env:
1212
# constants
13+
IAM_ROLE_ARN: 'arn:aws:iam::246442084943:role/AwsSdkCppGitHubRole'
1314
DOWNLOAD_FOLDER: '.build-scripts/'
1415
SCRIPT_LOCATION: 'workflows/start-pull-request-build/pull-request-build-v1.sh'
1516

16-
# custom variables
17-
IAM_ROLE_ARN: 'AwsSdkCppGitHubRole'
18-
ROLE_SESSION_DURATION_SECONDS: 7200
19-
2017
jobs:
2118
aws-sdk-pr-build:
2219
if: github.event.review.state == 'approved'
@@ -30,25 +27,23 @@ jobs:
3027
- name: Configure AWS Credentials
3128
uses: aws-actions/configure-aws-credentials@main
3229
with:
33-
role-to-assume: '$IAM_ROLE_ARN'
30+
role-to-assume: ${{ env.IAM_ROLE_ARN }}
3431
role-session-name: PullRequestBuildGitHubAction
35-
role-duration-seconds: '$ROLE_SESSION_DURATION_SECONDS'
32+
3633
aws-region: us-west-2
34+
role-duration-seconds: 7200
3735
- name: Download Build Script
3836
run: |
3937
aws s3 cp s3://aws-sdk-builds-github-assets-prod-us-west-2/$SCRIPT_LOCATION ./$DOWNLOAD_FOLDER/$SCRIPT_LOCATION --no-progress
4038
chmod +x ./$DOWNLOAD_FOLDER/$SCRIPT_LOCATION
4139
- name: Build
4240
env:
4341
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44-
REPO: ${{ github.repository }}
4542
HEAD_REF: ${{ github.event.pull_request.head.ref }}
46-
PR_NUMBER: ${{ github.event.pull_request.number }}
47-
RUN_ID: ${{ github.run_id }}
4843
run: |
4944
./$DOWNLOAD_FOLDER/$SCRIPT_LOCATION \
50-
--repo "$REPO" \
45+
--repo "${{ github.repository }}" \
5146
--branch "$HEAD_REF" \
52-
--pr-number "$PR_NUMBER" \
53-
--run-id "$RUN_ID"
47+
--pr-number "${{ github.event.pull_request.number }}" \
48+
--run-id "${{ github.run_id }}"
5449
timeout-minutes: 180

.github/workflows/simple-build.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)