Skip to content

Commit

Permalink
Merge pull request #7939 from LedgerHQ/fix/checkout-external-contribu…
Browse files Browse the repository at this point in the history
…tion

Checkout external contributions
  • Loading branch information
KVNLS authored Sep 27, 2024
2 parents b79f61a + d606f6b commit 6258f19
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 37 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/build-and-test-external.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,30 @@ jobs:
needs: determine-affected
if: ${{contains(needs.determine-affected.outputs.paths, 'ledger-live-desktop') && github.event.pull_request.head.repo.full_name != github.repository }}
uses: LedgerHQ/ledger-live/.github/workflows/build-desktop-external-reusable.yml@develop
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
secrets: inherit

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: LedgerHQ/ledger-live/.github/workflows/test-desktop-external-reusable.yml@develop
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
secrets: inherit

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: LedgerHQ/ledger-live/.github/workflows/build-mobile-external-reusable.yml@develop
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
secrets: inherit

# Final Check required
ok:
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/build-desktop-external-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ on:
If you run this manually, and want to run on a PR, the correct ref should be refs/pull/{PR_NUMBER}/merge to
have the "normal" scenario involving checking out a merge commit between your branch and the base branch.
If you want to run only on a branch or specific commit, you can use either the sha or the branch name instead (prefer the first verion for PRs).
required: false
required: true
login:
description: The GitHub username that triggered the workflow
required: false
base_ref:
description: The base branch to merge the head into when checking out the code
required: false
repository:
description: The repository to checkout the code from
required: true

jobs:
build-desktop-app:
Expand Down Expand Up @@ -46,7 +46,9 @@ jobs:
}
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
- name: Setup git user
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-git-user@develop
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/build-mobile-external-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ on:
If you run this manually, and want to run on a PR, the correct ref should be refs/pull/{PR_NUMBER}/merge to
have the "normal" scenario involving checking out a merge commit between your branch and the base branch.
If you want to run only on a branch or specific commit, you can use either the sha or the branch name instead (prefer the first verion for PRs).
required: true
login:
description: The GitHub username that triggered the workflow
required: false
base_ref:
description: The base branch to merge the head into when checking out the code
required: false
repository:
description: The repository to checkout the code from
required: true

permissions:
contents: read
Expand All @@ -28,7 +29,9 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
- name: Setup git user
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-git-user@develop
Expand Down Expand Up @@ -88,7 +91,9 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
- name: Setup git user
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-git-user@develop
Expand Down
43 changes: 16 additions & 27 deletions .github/workflows/test-desktop-external-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ on:
If you run this manually, and want to run on a PR, the correct ref should be refs/pull/{PR_NUMBER}/merge to
have the "normal" scenario involving checking out a merge commit between your branch and the base branch.
If you want to run only on a branch or specific commit, you can use either the sha or the branch name instead (prefer the first verion for PRs).
required: false
required: true
login:
description: The GitHub username that triggered the workflow
required: false
base_ref:
description: The base branch to merge the head into when checking out the code
required: false
repository:
description: The repository to checkout the code from
required: true

permissions:
id-token: write
Expand All @@ -32,7 +32,9 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
- name: Setup the toolchain
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-toolchain@develop
Expand Down Expand Up @@ -68,7 +70,9 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
- name: Setup the toolchain
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-toolchain@develop
Expand All @@ -94,7 +98,9 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
- name: Setup the toolchain
uses: LedgerHQ/ledger-live/tools/actions/composites/setup-toolchain@develop
Expand Down Expand Up @@ -152,7 +158,9 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
ref: ${{ inputs.ref }}
repository: ${{ inputs.repository }}
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: false
- name: "download linter results"
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -318,22 +326,3 @@ jobs:
with:
name: summary.json
path: ${{ github.workspace }}/summary.json

allure-report:
name: "Allure Reports Export on Server"
needs: [e2e-tests-linux]
runs-on: [ledger-live-medium]
if: ${{ !cancelled() && github.ref_name == 'develop' }}
steps:
- name: checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
- name: Send Results and Generate Allure Report - Linux
uses: LedgerHQ/ledger-live/tools/actions/composites/upload-allure-report@develop
if: ${{ !cancelled() }}
with:
platform: linux
login: ${{ vars.ALLURE_USERNAME }}
password: ${{ secrets.ALLURE_LEDGER_LIVE_PASSWORD }}
path: allure-results-linux

0 comments on commit 6258f19

Please sign in to comment.