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

Commit

Permalink
LL-8955 external contributions CI
Browse files Browse the repository at this point in the history
  • Loading branch information
valpinkman committed Jan 14, 2022
1 parent 3d752e1 commit c16ef28
Showing 1 changed file with 18 additions and 22 deletions.
40 changes: 18 additions & 22 deletions .github/workflows/bundle-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,19 @@ jobs:
with:
access_token: ${{ secrets.GITHUB_TOKEN }}

check-org-member:
check-if-fork:
needs: [cancel-previous]
runs-on: ubuntu-20.04
outputs:
forked: ${{ steps.forked.outputs.forked }}
steps:
- uses: ledgerhq/actions/packages/is-org-member@main
with:
organisation: ledgerhq
username: ${{ github.actor }}
token: ${{ github.token }}
- name: check if we are on a forked repo
id: forked
run: echo "::set-output name=forked::$(${{github.event.pull_request.head.repo.full_name != github.repository}})"

start-runner:
needs: [check-org-member]
if: success()
needs: [check-if-fork]
if: ${{ !needs.check-if-fork.outputs.forked }}
name: "start ec2 instance (Linux)"
uses: ledgerhq/actions/.github/workflows/start-linux-runner.yml@main
with:
Expand Down Expand Up @@ -63,10 +64,17 @@ jobs:
run: |
git config user.email "team-live@ledger.fr"
git config user.name "Team Live"
- name: install yarn
if: always()
run: |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install yarn
- uses: actions/setup-node@main
if: always()
with:
node-version: 14.x
cache: yarn
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
Expand All @@ -78,18 +86,6 @@ jobs:
java-version: 1.8
- name: Setup Android SDK
uses: android-actions/setup-android@v2.0.6
- name: install yarn
if: always()
run: npm install --global yarn
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2.1.3
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: install dependencies
run: yarn --frozen-lockfile --network-timeout 100000
- uses: ledgerhq/actions/get-package-infos@v1.0.0
Expand Down Expand Up @@ -118,8 +114,8 @@ jobs:
path: android/app/build/outputs/apk/release

bundle-apk-guest:
needs: [check-org-member]
if: failure()
needs: [check-if-fork]
if: needs.check-if-fork.outputs.forked
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
Expand Down

0 comments on commit c16ef28

Please sign in to comment.