Skip to content

Commit b7fc694

Browse files
Add secret into get_app_metadata workflow
1 parent 96b574f commit b7fc694

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
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: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,6 @@ on:
6262
required: false
6363
default: ""
6464
type: string
65-
token:
66-
description: 'Optional token for authentication'
67-
required: false
68-
default: ${{ github.token }}
69-
type: string
7065

7166
jobs:
7267
call_get_app_metadata:
@@ -79,6 +74,8 @@ jobs:
7974
app_repository: ${{ inputs.app_repository }}
8075
app_branch_name: ${{ inputs.app_branch_name }}
8176
compatible_devices: ${{ inputs.run_for_devices }}
77+
secrets:
78+
token: ${{ secrets.token }}
8279

8380
build:
8481
name: Build application for NanoS, X, S+, and Stax
@@ -98,7 +95,7 @@ jobs:
9895
repository: ${{ inputs.app_repository }}
9996
ref: ${{ inputs.app_branch_name }}
10097
submodules: recursive
101-
token: ${{ secrets.token }}
98+
token: ${{ secrets.token && secrets.token || github.token }}
10299

103100
- name: Build application
104101
id: "build"

0 commit comments

Comments
 (0)