|
7 | 7 | required: false
|
8 | 8 | default: ''
|
9 | 9 | type: string
|
| 10 | + rust_sdk_branch: |
| 11 | + required: false |
| 12 | + default: 'master' |
| 13 | + type: string |
10 | 14 | workflow_dispatch:
|
11 |
| - pull_request: |
| 15 | + inputs: |
| 16 | + c_sdk_branch: |
| 17 | + required: false |
| 18 | + default: '' |
| 19 | + type: string |
| 20 | + rust_sdk_branch: |
| 21 | + required: false |
| 22 | + default: 'master' |
| 23 | + type: string |
12 | 24 |
|
13 | 25 | env:
|
14 | 26 | C_SDK_URL: 'https://github.com/LedgerHQ/ledger-secure-sdk.git'
|
15 | 27 |
|
16 |
| -jobs: |
17 |
| - how-workflow-is-called: |
18 |
| - name: Determine how the workflow is called |
19 |
| - runs-on: ubuntu-latest |
20 |
| - outputs: |
21 |
| - repository: ${{ steps.get_repo_and_branch.outputs.repo }} |
22 |
| - branch: ${{ steps.get_repo_and_branch.outputs.branch }} |
23 |
| - steps: |
24 |
| - - name: Get repository and branch |
25 |
| - id: get_repo_and_branch |
26 |
| - run: | |
27 |
| - if [ -n "${{ inputs.c_sdk_branch }}" ]; then |
28 |
| - echo "repo=LedgerHQ/ledger-device-rust-sdk" >> $GITHUB_OUTPUT |
29 |
| - echo "branch=master" >> $GITHUB_OUTPUT |
30 |
| - else |
31 |
| - echo "repo=${{ github.repository}}" >> $GITHUB_OUTPUT |
32 |
| - echo "branch=${{ github.ref }}" >> $GITHUB_OUTPUT |
33 |
| - fi |
| 28 | +jobs: |
34 | 29 | retrieve-rust-apps:
|
35 | 30 | name: Retrieve Rust Apps
|
36 | 31 | runs-on: ubuntu-latest
|
37 |
| - needs: how-workflow-is-called |
38 | 32 | outputs:
|
39 | 33 | rust_apps: ${{ steps.get_rust_apps.outputs.rust_apps }}
|
40 | 34 | steps:
|
41 | 35 | - name: Checkout repository
|
42 | 36 | uses: actions/checkout@v4
|
43 | 37 | with:
|
44 |
| - repository: ${{ needs.how-workflow-is-called.outputs.repository }} |
45 |
| - ref: ${{ needs.how-workflow-is-called.outputs.branch }} |
| 38 | + repository: LedgerHQ/ledger-device-rust-sdk |
| 39 | + ref: ${{ inputs.rust_sdk_branch }} |
46 | 40 | - name: Set up Python
|
47 | 41 | uses: actions/setup-python@v4
|
48 | 42 | with:
|
|
66 | 60 |
|
67 | 61 | test-build:
|
68 | 62 | name: Build for all targets
|
69 |
| - needs: [retrieve-rust-apps, how-workflow-is-called] |
| 63 | + needs: [retrieve-rust-apps] |
70 | 64 | strategy:
|
71 | 65 | fail-fast: false
|
72 | 66 | matrix:
|
|
83 | 77 | uses: actions/checkout@v4
|
84 | 78 | with:
|
85 | 79 | path: sdk
|
86 |
| - repository: ${{ needs.how-workflow-is-called.outputs.repository }} |
87 |
| - ref: ${{ needs.how-workflow-is-called.outputs.branch }} |
| 80 | + repository: LedgerHQ/ledger-device-rust-sdk |
| 81 | + ref: ${{ inputs.rust_sdk_branch }} |
88 | 82 | - name: Clone App
|
89 | 83 | uses: actions/checkout@v4
|
90 | 84 | with:
|
|
0 commit comments