From 9f6280a606ce30ed919ac8eef6528f5c2133df6e Mon Sep 17 00:00:00 2001 From: rory Date: Wed, 2 Oct 2024 17:36:27 -0700 Subject: [PATCH] Provide pull_request_number to AdHoc builds --- .github/workflows/buildAndroid.yml | 11 ++++++++++- .github/workflows/testBuild.yml | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/buildAndroid.yml b/.github/workflows/buildAndroid.yml index 091b88a59d94..582cb05256fa 100644 --- a/.github/workflows/buildAndroid.yml +++ b/.github/workflows/buildAndroid.yml @@ -16,6 +16,10 @@ on: type: string required: false default: '' + pull_request_number: + description: The pull request number associated with this build, if relevant. + type: number + required: false outputs: AAB_FILE_NAME: value: ${{ jobs.build.outputs.AAB_FILE_NAME }} @@ -38,6 +42,11 @@ on: required: true type: string + pull_request_number: + description: The pull request number associated with this build, if relevant. + type: number + required: false + jobs: build: name: Build Android app @@ -94,7 +103,7 @@ jobs: if [ '${{ inputs.type }}' == 'adhoc' ]; then cp .env.staging .env.adhoc sed -i 's/ENVIRONMENT=staging/ENVIRONMENT=adhoc/' .env.adhoc - echo "PULL_REQUEST_NUMBER=$PULL_REQUEST_NUMBER" >> .env.adhoc + echo "PULL_REQUEST_NUMBER=${{ inputs.pull_request_number }}" >> .env.adhoc else envFile='' if [ '${{ inputs.type }}' == 'e2e' ]; then diff --git a/.github/workflows/testBuild.yml b/.github/workflows/testBuild.yml index 3847eaed6fd1..0a28d155f760 100644 --- a/.github/workflows/testBuild.yml +++ b/.github/workflows/testBuild.yml @@ -69,6 +69,7 @@ jobs: with: type: adhoc ref: ${{ github.event.pull_request.head.sha || needs.getBranchRef.outputs.REF }} + pull_request_number: ${{ env.PULL_REQUEST_NUMBER }} uploadAndroid: name: Upload Android app to S3