forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (68 loc) · 3.15 KB
/
Copy pathtestBuild.yml
File metadata and controls
72 lines (68 loc) · 3.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Build and deploy apps for testing
on:
workflow_dispatch:
inputs:
# If not specified, only build iOS and Android apps from the main branch of Expensify/App
APP_PULL_REQUEST_URL:
description: The Expensify/App pull request URL (e.g., https://github.com/Expensify/App/pull/12345). Defaults to main.
required: false
default: ''
# Pull Request URL from Mobile-Expensify repo for correct placement of OD app. It will take precedence over MOBILE-EXPENSIFY from App's PR description if both are specified. If nothing is specified defaults to Mobile-Expensify's main
MOBILE_EXPENSIFY_PULL_REQUEST_URL:
description: The Expensify/Mobile-Expensify pull request URL. Defaults to main. Overrides MOBILE-EXPENSIFY set in App's PR description.
required: false
default: ''
REVIEWED_CODE:
description: I reviewed this pull request and verified that it does not contain any malicious code.
type: boolean
required: true
default: false
WEB:
description: Should build web app?
type: boolean
default: true
IOS:
description: Should build iOS app?
type: boolean
default: true
ANDROID:
description: Should build android app?
type: boolean
default: true
FORCE_NATIVE_BUILD:
description: Force a full native build, bypassing Rock remote cache
type: boolean
default: false
jobs:
# Validates the actor and that they reviewed the PR before any token is used or untrusted code is checked out.
prep:
uses: ./.github/workflows/validateBuildRequest.yml
with:
REVIEWED_CODE: ${{ inputs.REVIEWED_CODE }}
secrets:
OS_BOTIFY_COMMIT_TOKEN: ${{ secrets.OS_BOTIFY_COMMIT_TOKEN }}
# Resolves the App head ref and the Mobile-Expensify ref from the provided PR URLs (or the App PR's MOBILE-EXPENSIFY entry).
# `needs: [prep]` gates this behind prep's actor validation before any token is used.
resolveRefs:
needs: [prep]
uses: ./.github/workflows/resolveBuildRefs.yml
with:
APP_PULL_REQUEST_URL: ${{ inputs.APP_PULL_REQUEST_URL }}
MOBILE_EXPENSIFY_PULL_REQUEST_URL: ${{ inputs.MOBILE_EXPENSIFY_PULL_REQUEST_URL }}
secrets:
OS_BOTIFY_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
buildApps:
needs: [prep, resolveRefs]
uses: ./.github/workflows/buildAdHoc.yml
with:
# Fall back to App main when nothing is resolved (test builds default to the latest NewDot).
APP_REF: ${{ needs.resolveRefs.outputs.APP_REF || 'main' }}
APP_PR_NUMBER: ${{ needs.resolveRefs.outputs.APP_PR_NUMBER }}
# Fall back to Mobile-Expensify main when nothing is resolved (test builds track the latest OldDot).
MOBILE_EXPENSIFY_REF: ${{ needs.resolveRefs.outputs.MOBILE_EXPENSIFY_REF || 'main' }}
MOBILE_EXPENSIFY_PR: ${{ needs.resolveRefs.outputs.MOBILE_EXPENSIFY_PR }}
BUILD_WEB: ${{ inputs.WEB && 'true' || 'false' }}
BUILD_IOS: ${{ inputs.IOS && 'true' || 'false' }}
BUILD_ANDROID: ${{ inputs.ANDROID && 'true' || 'false' }}
FORCE_NATIVE_BUILD: ${{ inputs.FORCE_NATIVE_BUILD && 'true' || 'false' }}
secrets: inherit