Skip to content

Commit

Permalink
feat: Create master workflow for external contributors
Browse files Browse the repository at this point in the history
  • Loading branch information
KVNLS committed Sep 11, 2024
1 parent 2ec7933 commit d96e9cd
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/build-and-test-external.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build and Test External
on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name != 'develop' && github.ref || github.run_id }}
cancel-in-progress: true

permissions:
id-token: write
contents: read
pull-requests: write

jobs:
determine-affected:
name: "Turbo Affected"
if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-desktop') && github.event.pull_request.head.repo.full_name != github.repository }}
uses: ./.github/workflows/turbo-affected-reusable.yml
with:
head_branch: ${{ github.event.pull_request.head.ref || github.event.merge_group.head_ref }}
base_branch: ${{ github.event.pull_request.base.ref || github.event.merge_group.base_ref }}

# External from Fork branches
build-desktop-external:
name: "[External] Build Desktop"
needs: determine-affected
if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-desktop') && github.event.pull_request.head.repo.full_name != github.repository }}
uses: ./.github/workflows/build-desktop-external-reusable.yml

test-desktop-external:
name: "[External] Test Desktop"
needs: determine-affected
if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-desktop') && github.event.pull_request.head.repo.full_name != github.repository }}
uses: ./.github/workflows/test-desktop-external-reusable.yml

build-mobile-external:
name: "[External] Build Mobile"
needs: determine-affected
if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-mobile') && github.event.pull_request.head.repo.full_name != github.repository}}
uses: ./.github/workflows/build-mobile-external-reusable.yml

# Final Check required
ok:
name: "OK"
needs:
- build-desktop-external
- test-desktop-external
- build-mobile-external
runs-on: ubuntu-22.04
if: ${{ always() && github.event.pull_request.head.repo.full_name != github.repository }}
steps:
- name: Check result
if: contains(needs.*.result, 'failure')
run: exit 1

0 comments on commit d96e9cd

Please sign in to comment.