diff --git a/.github/scripts/uploadE2eBuildToEmerge.ts b/.github/scripts/uploadE2eBuildToEmerge.ts index 943f12d47c3..5456838c4ef 100644 --- a/.github/scripts/uploadE2eBuildToEmerge.ts +++ b/.github/scripts/uploadE2eBuildToEmerge.ts @@ -30,6 +30,11 @@ function getGitHubInfo() { // Get the SHA of the previous commit, which will be the baseSha in the case of a push event. baseSha = eventFileJson?.before ?? '' branchName = process.env.GITHUB_REF_NAME ?? '' + } else if (process.env.GITHUB_EVENT_NAME === 'merge_group') { + sha = process.env.GITHUB_SHA ?? '' + // Get the SHA of the base commit, which will be the base_sha in the case of a merge_group event. + baseSha = eventFileJson?.merge_group?.base_sha ?? '' + branchName = process.env.GITHUB_REF_NAME ?? '' } else { throw new Error(`Unsupported action trigger: ${process.env.GITHUB_EVENT_NAME}`) } diff --git a/.github/workflows/e2e-ios.yml b/.github/workflows/e2e-ios.yml index b1fa21915b6..b2d58c866a6 100644 --- a/.github/workflows/e2e-ios.yml +++ b/.github/workflows/e2e-ios.yml @@ -56,7 +56,7 @@ jobs: - name: Upload Detox Build to Emerge if: | env.SECRETS_AVAILABLE - && (github.event_name == 'pull_request' || github.event_name == 'push') + && (github.event_name == 'pull_request' || github.event_name == 'push' || github.event_name == 'merge_group') run: yarn ts-node .github/scripts/uploadE2eBuildToEmerge.ts env: EMERGE_API_TOKEN: ${{ steps.google-secrets.outputs.EMERGE_API_TOKEN }}