Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Commit

Permalink
LL-8891 switch to run CI on external contribs
Browse files Browse the repository at this point in the history
  • Loading branch information
valpinkman committed Jan 5, 2022
1 parent 92db201 commit 4b900b4
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 23 deletions.
65 changes: 61 additions & 4 deletions .github/workflows/bundle-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,18 @@ jobs:
with:
access_token: ${{ secrets.GITHUB_TOKEN }}

check-org-member:
runs-on: ubuntu-20.04
steps:
- uses: ledgerhq/actions/packages/is-org-member@main
with:
organisation: ledgerhq
username: ${{ github.actor }}
token: ${{ github.token }}

start-runner:
needs: cancel-previous
needs: [check-org-member]
if: success()
name: "start ec2 instance (Linux)"
uses: ledgerhq/actions/.github/workflows/start-linux-runner.yml@main
with:
Expand All @@ -28,7 +38,7 @@ jobs:

stop-runner:
name: "stop ec2 instance (Linux)"
needs: [start-runner, bundle-apk]
needs: [start-runner, bundle-apk-hosted]
uses: ledgerhq/actions/.github/workflows/stop-linux-runner.yml@main
if: ${{ always() }}
with:
Expand All @@ -37,8 +47,8 @@ jobs:
secrets:
CI_BOT_TOKEN: ${{ secrets.CI_BOT_TOKEN }}

bundle-apk:
needs: [cancel-previous, start-runner]
bundle-apk-hosted:
needs: [start-runner]
runs-on: ${{ needs.start-runner.outputs.label }}
steps:
- name: prepare runner
Expand Down Expand Up @@ -106,3 +116,50 @@ jobs:
with:
name: ${{ steps.post-version.outputs.version }}-release
path: android/app/build/outputs/apk/release

bundle-apk-guest:
needs: [check-org-member]
if: failure()
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: set git user
run: |
git config user.email "team-live@ledger.fr"
git config user.name "Team Live"
- uses: actions/setup-node@main
with:
node-version: 14.x
cache: yarn
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: install dependencies
run: yarn --frozen-lockfile --network-timeout 100000
- uses: ledgerhq/actions/get-package-infos@v1.0.0
id: version
- name: set beta name
uses: ledgerhq/actions/packages/change-product-name@main
with:
path: ${{ github.workspace }}
- name: Get short SHA
id: slug
run: echo "::set-output name=sha8::$(git rev-parse HEAD)"
- name: make local version
run: yarn version --new-version=${{ steps.version.outputs.clean }}-sha.${{ steps.slug.outputs.sha8 }}
- name: build the app
env:
ANDROID_KEYSTORE_PASS: staging
ANDROID_KEY_ALIAS: staging
ANDROID_KEY_PASS: staging
run: ANDROID_KEYSTORE_FILE="$(pwd)/android/app/staging.kstr" yarn android:local:apk
- uses: ledgerhq/actions/get-package-infos@v1.0.0
id: post-version
- name: upload Android app
uses: actions/upload-artifact@v1
with:
name: ${{ steps.post-version.outputs.version }}-release
path: android/app/build/outputs/apk/release
19 changes: 0 additions & 19 deletions ios/ledgerlivemobile.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
A3B86A0A04E74A989A896DF8 /* Upload Debug Symbols to Sentry */,
760D57A3243689E700E1EDF6 /* ShellScript */,
C4E0BF1054A81968694B12B5 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -539,24 +538,6 @@
shellPath = /bin/sh;
shellScript = "export SENTRY_PROPERTIES=sentry.properties\n../node_modules/@sentry/cli/bin/sentry-cli upload-dif \"$DWARF_DSYM_FOLDER_PATH\"\n";
};
C4E0BF1054A81968694B12B5 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ledgerlivemobile/Pods-ledgerlivemobile-frameworks.sh",
"${PODS_ROOT}/../../node_modules/@ledgerhq/react-native-ledger-core/ios/Frameworks/universal/ledger-core.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ledger-core.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ledgerlivemobile/Pods-ledgerlivemobile-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
CF42614A9FBDE8C6FA541F32 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down

0 comments on commit 4b900b4

Please sign in to comment.