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
17 changes: 14 additions & 3 deletions .github/workflows/testBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
PULL_REQUEST_NUMBER:
description: Pull Request number for correct placement of apps
required: true
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
Expand All @@ -19,15 +24,15 @@ on:
type: boolean
default: true
IOS_HYBRID:
description: Should build iOS hybrid app?
description: Should build iOS hybrid app?
type: boolean
default: true
ANDROID:
description: Should build android app?
description: Should build android app?
type: boolean
default: true
ANDROID_HYBRID:
description: Should build android hybrid app?
description: Should build android hybrid app?
type: boolean
default: true

Expand All @@ -50,6 +55,12 @@ jobs:
REQUIRE_APP_DEPLOYER: false
OS_BOTIFY_TOKEN: ${{ secrets.OS_BOTIFY_COMMIT_TOKEN }}

- name: Validate that the user reviewed the pull request before running a test build
if: ${{ !inputs.REVIEWED_CODE }}
run: |
echo "::error::🕵️‍♀️ Please carefully review the pull request before running a test build to ensure it does not contain any malicious code"
exit 1

- name: Check if pull request number is correct
if: ${{ github.event_name == 'workflow_dispatch' }}
id: getHeadRef
Expand Down
20 changes: 15 additions & 5 deletions .github/workflows/testBuildHybrid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ name: Build and deploy hybrid apps for testing
on:
workflow_dispatch:
inputs:
REVIEWED_CODE:
description: I reviewed this pull request and verified that it does not contain any malicious code.
type: boolean
required: true
default: false
# Pull Request number from App repo for correct placement of ND app. If not specified defaults to main branch.
APP_PULL_REQUEST_NUMBER:
description: App PR number. Defaults to main.
Expand Down Expand Up @@ -36,16 +41,15 @@ on:
description: Should build Android app?
type: boolean
default: true

outputs:
ANDROID_LINK:
value: ${{ jobs.androidHybrid.outputs.S3_APK_PATH }}
IOS_LINK:
value: ${{ jobs.iosHybrid.outputs.IOS_PATH }}



env:
# This variable is needed for fastlane to construct correct path, -hybrid suffix is needed to distinguish hybrid apps from standalone New Dot
# This variable is needed for fastlane to construct correct path, -hybrid suffix is needed to distinguish hybrid apps from standalone New Dot
PULL_REQUEST_NUMBER: ${{ github.event.inputs.APP_PULL_REQUEST_NUMBER || github.event.inputs.HYBRIDAPP_PULL_REQUEST_NUMBER || inputs.APP_PR_NUMBER}}-hybrid

jobs:
Expand All @@ -62,6 +66,12 @@ jobs:
REQUIRE_APP_DEPLOYER: false
OS_BOTIFY_TOKEN: ${{ secrets.OS_BOTIFY_COMMIT_TOKEN }}

- name: Validate that the user reviewed the pull request before running a test build
if: ${{ github.event_name == 'workflow_dispatch' && !inputs.REVIEWED_CODE }}
run: |
echo "::error::🕵️‍♀️ Please carefully review the pull request before running a test build to ensure it does not contain any malicious code"
exit 1

- name: Validate input
if: github.event.inputs.DISPATCHED_MANUALLY
run: |
Expand Down Expand Up @@ -154,7 +164,7 @@ jobs:
uses: ./.github/workflows/postBuildStartedComment.yml
needs: [getNewDotRef, getOldDotPR, getOldDotRef]
secrets: inherit
with:
with:
APP_PULL_REQUEST_NUMBER: ${{ inputs.APP_PULL_REQUEST_NUMBER }}
HYBRIDAPP_PULL_REQUEST_NUMBER: ${{ github.event.inputs.HYBRIDAPP_PULL_REQUEST_NUMBER || needs.getOldDotPR.outputs.OLD_DOT_PR }}

Expand Down