Skip to content

Commit 27aef2b

Browse files
authored
Revert fork workflow. (#6929)
* Revert "Switch to branch instead of sha (#6928)" This reverts commit 3b6d78f. * Revert "Fork PR workflow (#6908)" This reverts commit 9568628.
1 parent 3b6d78f commit 27aef2b

1 file changed

Lines changed: 6 additions & 18 deletions

File tree

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Build SDK
22
on:
33
merge_group:
4-
pull_request_target:
4+
pull_request:
55
push:
66
branches:
77
- master
@@ -11,7 +11,7 @@ on:
1111
- 'docs/**'
1212

1313
concurrency:
14-
group: start-pull-request-build-${{ github.event.pull_request.number || github.ref }}
14+
group: start-pull-request-build-${{ github.ref }}
1515
cancel-in-progress: true
1616

1717
env:
@@ -20,28 +20,18 @@ env:
2020

2121
jobs:
2222
aws-sdk-pr-build:
23-
if: >
24-
github.event_name != 'pull_request_target' ||
25-
github.event.pull_request.draft == false
23+
if: github.event_name == 'merge_group' || github.event.pull_request.draft == false
2624
runs-on: ubuntu-latest
2725
permissions:
2826
id-token: write
2927
issues: write
3028
pull-requests: write
3129
contents: read
32-
# Fork PRs, require manual approval via the "fork-ci" environment.
33-
# Internal PRs and merge_group events run with no environment gate.
34-
environment: >-
35-
${{
36-
github.event_name == 'pull_request_target' &&
37-
github.event.pull_request.head.repo.full_name != github.repository &&
38-
'fork-ci' || ''
39-
}}
4030
steps:
4131
- name: Configure AWS Credentials
4232
uses: aws-actions/configure-aws-credentials@v4
4333
with:
44-
role-to-assume: ${{ secrets.PR_WORKFLOW_IAM_ROLE_ARN }}
34+
role-to-assume: ${{secrets.PR_WORKFLOW_IAM_ROLE_ARN}}
4535
role-session-name: PullRequestBuildGitHubAction
4636
aws-region: us-west-2
4737
role-duration-seconds: 10800 # 3 hrs
@@ -52,11 +42,9 @@ jobs:
5242
- name: Build
5343
env:
5444
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55-
HEAD_REF: ${{ github.event.pull_request.head.ref || github.ref }}
45+
HEAD_REF: ${{ github.event.pull_request.head.ref || github.ref_name }}
5646
PR_NUMBER: ${{ github.event.pull_request.number }}
5747
run: |
58-
# For merge_group events, extract the PR number from the ref name
59-
# (e.g. gh-readonly-queue/main/pr-1234-<sha>)
6048
if [ -z "$PR_NUMBER" ] && [[ "$HEAD_REF" =~ ^gh-readonly-queue/.+/pr-([0-9]+)- ]]; then
6149
PR_NUMBER="${BASH_REMATCH[1]}"
6250
fi
@@ -65,4 +53,4 @@ jobs:
6553
--branch "$HEAD_REF" \
6654
--pr-number "$PR_NUMBER" \
6755
--run-id "${{ github.run_id }}"
68-
timeout-minutes: 120
56+
timeout-minutes: 120

0 commit comments

Comments
 (0)