Skip to content

Commit 93ec284

Browse files
authored
Add auto-merge for botocore sync PRs (#281)
* Add auto-merge for botocore sync PRs * revert manual testing changes
1 parent be62061 commit 93ec284

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/auto-merge.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Merge Botocore Sync PR
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "main*"
7+
paths:
8+
- "sample/**/*.json"
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.head_ref }}
12+
cancel-in-progress: true
13+
14+
permissions:
15+
id-token: write # This is required for requesting the JWT
16+
contents: read
17+
18+
jobs:
19+
merge-botocore-sync-pr:
20+
runs-on: ubuntu-latest
21+
if: github.event.pull_request.user.login == 'sagemaker-bot' && startsWith(github.event.pull_request.head.ref, 'botocore-sync') && startsWith(github.event.pull_request.title, 'Daily Sync with Botocore')
22+
steps:
23+
- name: Configure AWS Credentials
24+
uses: aws-actions/configure-aws-credentials@v4
25+
with:
26+
role-to-assume: ${{ secrets.CODEBUILD_ROLE_ARN }}
27+
role-duration-seconds: 10800
28+
aws-region: us-west-2
29+
- name: Auto Merge Botocore Sync PRs
30+
uses: aws-actions/aws-codebuild-run-build@v1
31+
with:
32+
project-name: sagemaker-core-merge-botocore-pr
33+
env-vars-for-codebuild: |
34+
PR_NUMBER,
35+
COMMIT_SHA
36+
env:
37+
PR_NUMBER: ${{ github.event.pull_request.number }}
38+
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}

0 commit comments

Comments
 (0)