-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add Catapult PR GitHub workflow #3340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
76b1907
Add GitHub workflow for test account
richardwang1124 06402f4
Update trigger
richardwang1124 5b2418d
Fix role arn
richardwang1124 4c18f90
Change trigger to approve
richardwang1124 db2aca4
Add manual trigger
richardwang1124 0b8ae43
Test bad change
richardwang1124 4678988
Change trigger for testing
richardwang1124 cd3feb4
Add prod role
richardwang1124 7855087
Revert "Test bad change"
richardwang1124 2f32955
Revert trigger
richardwang1124 78f875b
Test two way validation
richardwang1124 c0a89f4
Revert "Test two way validation"
richardwang1124 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| name: Build SDK | ||
| on: | ||
| pull_request_review: | ||
| types: [ submitted ] | ||
| branches: [ version-3 ] | ||
| workflow_dispatch: | ||
|
|
||
| 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: 'arn:aws:iam::525369684841:role/AwsSdkRubyGitHubRole' | ||
| 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: ${{ env.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 | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.