Skip to content

Commit 318594f

Browse files
Merge pull request #126 from LedgerHQ/optional-input-token
Add Optional secret token
2 parents 4c82755 + b7fc694 commit 318594f

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.github/workflows/_get_app_metadata.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Output metadata on the application, inferred from the local 'ledger_app.to
22

33
on:
44
workflow_call:
5+
secrets:
6+
token:
7+
description: 'A token passed from the caller workflow'
8+
required: false
59
inputs:
610
app_repository:
711
description: 'The GIT repository to build (defaults to `github.repository`)'
@@ -65,6 +69,7 @@ jobs:
6569
repository: ${{ inputs.app_repository }}
6670
ref: ${{ inputs.app_branch_name }}
6771
submodules: recursive
72+
token: ${{ secrets.token && secrets.token || github.token }}
6873

6974
- name: Install dependencies
7075
run: pip install ledgered

.github/workflows/reusable_build.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Build the application for all devices and upload the artifact
22

33
on:
44
workflow_call:
5+
secrets:
6+
token:
7+
description: 'A token passed from the caller workflow'
8+
required: false
59
inputs:
610
app_repository:
711
description: 'The GIT repository to build (defaults to `github.repository`)'
@@ -70,6 +74,8 @@ jobs:
7074
app_repository: ${{ inputs.app_repository }}
7175
app_branch_name: ${{ inputs.app_branch_name }}
7276
compatible_devices: ${{ inputs.run_for_devices }}
77+
secrets:
78+
token: ${{ secrets.token }}
7379

7480
build:
7581
name: Build application for NanoS, X, S+, and Stax
@@ -89,6 +95,7 @@ jobs:
8995
repository: ${{ inputs.app_repository }}
9096
ref: ${{ inputs.app_branch_name }}
9197
submodules: recursive
98+
token: ${{ secrets.token && secrets.token || github.token }}
9299

93100
- name: Build application
94101
id: "build"

0 commit comments

Comments
 (0)