Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ fingerprint.config.js @MetaMask/mobile-pla
builds.yml @MetaMask/mobile-platform
.github/workflows/create-build-branch.yml @MetaMask/mobile-platform
.github/workflows/push-eas-update.yml @MetaMask/mobile-admins
.github/workflows/build-and-upload-to-testflight.yml @MetaMask/mobile-admins
.github/workflows/upload-to-testflight.yml @MetaMask/mobile-admins
scripts/update-expo-channel.js @MetaMask/mobile-admins
certs/certificate.pem @MetaMask/mobile-admins
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/push-eas-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,31 @@ on:
- android
default: all

workflow_call:
inputs:
pr_number:
description: 'PR number to publish (uses PR branch HEAD commit)'
type: string
required: true
base_branch:
description: 'Base ref to compare fingerprints against (branch name like "main" or tag name like "v7.61.6")'
type: string
required: true
message:
description: 'EAS update message'
type: string
required: true
channel:
description: 'OTA channel to push update to (exp, rc, production)'
type: string
required: false
default: exp
platform:
description: 'Platform to update (all, ios, android)'
type: string
required: false
default: all

permissions:
contents: read
id-token: write
Expand Down
29 changes: 9 additions & 20 deletions .github/workflows/runway-ota-build-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@ jobs:
echo "Resolving PR for branch: $BRANCH (repo: $GITHUB_REPOSITORY)"

# Try same-repo head first, then owner:branch (required by API when listing pulls)
PR_NUMBER=$(gh pr list --repo "$GITHUB_REPOSITORY" --head "$BRANCH" --json number --jq '.[0].number' 2>/dev/null || echo "")
# jq '.[0].number' on an empty array outputs the literal string "null", so normalise to empty
PR_NUMBER=$(gh pr list --repo "$GITHUB_REPOSITORY" --head "$BRANCH" --json number --jq '.[0].number // empty' 2>/dev/null || echo "")
if [[ -z "$PR_NUMBER" ]]; then
PR_NUMBER=$(gh pr list --repo "$GITHUB_REPOSITORY" --head "$GITHUB_REPOSITORY_OWNER:$BRANCH" --json number --jq '.[0].number' 2>/dev/null || echo "")
PR_NUMBER=$(gh pr list --repo "$GITHUB_REPOSITORY" --head "$GITHUB_REPOSITORY_OWNER:$BRANCH" --json number --jq '.[0].number // empty' 2>/dev/null || echo "")
fi

echo "pr_number=${PR_NUMBER}" >> "$GITHUB_OUTPUT"
Expand Down Expand Up @@ -161,25 +162,13 @@ jobs:
echo "Using PR #${{ needs.decide.outputs.pr_number }}"

- name: Trigger Push OTA Update workflow
uses: actions/github-script@v7
uses: ./.github/workflows/push-eas-update.yml
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const ref = '${{ inputs.source_branch || github.ref_name }}'.replace(/^refs\/heads\//, '');
await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'push-eas-update.yml',
ref: ref,
inputs: {
pr_number: '${{ needs.decide.outputs.pr_number }}',
base_branch: '${{ needs.decide.outputs.base_ref }}',
message: '${{ needs.decide.outputs.ota_version }}',
channel: '${{ inputs.ota_channel }}',
platform: '${{ inputs.platform }}'
}
});
core.notice(`Triggered Push OTA Update on ${ref} (PR #${{ needs.decide.outputs.pr_number }}, base: ${{ needs.decide.outputs.base_ref }}, message: ${{ needs.decide.outputs.ota_version }})`);
pr_number: ${{ needs.decide.outputs.pr_number }}
base_branch: ${{ needs.decide.outputs.base_ref }}
message: ${{ needs.decide.outputs.ota_version }}
channel: ${{ inputs.ota_channel }}
platform: ${{ inputs.platform }}

- name: Export release tag for OTA follow-up jobs
id: release_tag
Expand Down
Loading