66 APIKey :
77 description : The API key for the PowerShell Gallery.
88 required : true
9- TEST_APP_ENT_CLIENT_ID :
10- description : The client ID of an Enterprise GitHub App for running tests.
11- required : false
12- TEST_APP_ENT_PRIVATE_KEY :
13- description : The private key of an Enterprise GitHub App for running tests.
14- required : false
15- TEST_APP_ORG_CLIENT_ID :
16- description : The client ID of an Organization GitHub App for running tests.
17- required : false
18- TEST_APP_ORG_PRIVATE_KEY :
19- description : The private key of an Organization GitHub App for running tests.
20- required : false
21- TEST_USER_ORG_FG_PAT :
22- description : The fine-grained personal access token with org access for running tests.
23- required : false
24- TEST_USER_USER_FG_PAT :
25- description : The fine-grained personal access token with user account access for running tests.
26- required : false
27- TEST_USER_PAT :
28- description : The classic personal access token for running tests.
9+ TestSecrets :
10+ description : |
11+ Optional JSON object mapping environment variable names to secret values that are exposed to
12+ the module test jobs (BeforeAll-ModuleLocal, Test-ModuleLocal, AfterAll-ModuleLocal).
13+ The calling workflow decides which secrets to provide and builds the JSON using
14+ toJSON(secrets.<name>) so that quoting and multi-line values are encoded correctly. Each
15+ entry is exposed as an environment variable that the module's Pester tests read via
16+ $env:<name>. Values are masked in the logs. Omit it entirely when the module needs no
17+ secrets. See the README for a complete example.
2918 required : false
3019 inputs :
3120 SettingsPath :
@@ -168,13 +157,7 @@ jobs:
168157 if : fromJson(needs.Get-Settings.outputs.Settings).Run.BeforeAllModuleLocal && needs.Build-Module.result == 'success' && !cancelled()
169158 uses : ./.github/workflows/BeforeAll-ModuleLocal.yml
170159 secrets :
171- TEST_APP_ENT_CLIENT_ID : ${{ secrets.TEST_APP_ENT_CLIENT_ID }}
172- TEST_APP_ENT_PRIVATE_KEY : ${{ secrets.TEST_APP_ENT_PRIVATE_KEY }}
173- TEST_APP_ORG_CLIENT_ID : ${{ secrets.TEST_APP_ORG_CLIENT_ID }}
174- TEST_APP_ORG_PRIVATE_KEY : ${{ secrets.TEST_APP_ORG_PRIVATE_KEY }}
175- TEST_USER_ORG_FG_PAT : ${{ secrets.TEST_USER_ORG_FG_PAT }}
176- TEST_USER_USER_FG_PAT : ${{ secrets.TEST_USER_USER_FG_PAT }}
177- TEST_USER_PAT : ${{ secrets.TEST_USER_PAT }}
160+ TestSecrets : ${{ secrets.TestSecrets }}
178161 needs :
179162 - Build-Module
180163 - Get-Settings
@@ -194,13 +177,7 @@ jobs:
194177 - BeforeAll-ModuleLocal
195178 uses : ./.github/workflows/Test-ModuleLocal.yml
196179 secrets :
197- TEST_APP_ENT_CLIENT_ID : ${{ secrets.TEST_APP_ENT_CLIENT_ID }}
198- TEST_APP_ENT_PRIVATE_KEY : ${{ secrets.TEST_APP_ENT_PRIVATE_KEY }}
199- TEST_APP_ORG_CLIENT_ID : ${{ secrets.TEST_APP_ORG_CLIENT_ID }}
200- TEST_APP_ORG_PRIVATE_KEY : ${{ secrets.TEST_APP_ORG_PRIVATE_KEY }}
201- TEST_USER_ORG_FG_PAT : ${{ secrets.TEST_USER_ORG_FG_PAT }}
202- TEST_USER_USER_FG_PAT : ${{ secrets.TEST_USER_USER_FG_PAT }}
203- TEST_USER_PAT : ${{ secrets.TEST_USER_PAT }}
180+ TestSecrets : ${{ secrets.TestSecrets }}
204181 with :
205182 Settings : ${{ needs.Get-Settings.outputs.Settings }}
206183
@@ -213,13 +190,7 @@ jobs:
213190 if : fromJson(needs.Get-Settings.outputs.Settings).Run.AfterAllModuleLocal && needs.Test-ModuleLocal.result != 'skipped' && always()
214191 uses : ./.github/workflows/AfterAll-ModuleLocal.yml
215192 secrets :
216- TEST_APP_ENT_CLIENT_ID : ${{ secrets.TEST_APP_ENT_CLIENT_ID }}
217- TEST_APP_ENT_PRIVATE_KEY : ${{ secrets.TEST_APP_ENT_PRIVATE_KEY }}
218- TEST_APP_ORG_CLIENT_ID : ${{ secrets.TEST_APP_ORG_CLIENT_ID }}
219- TEST_APP_ORG_PRIVATE_KEY : ${{ secrets.TEST_APP_ORG_PRIVATE_KEY }}
220- TEST_USER_ORG_FG_PAT : ${{ secrets.TEST_USER_ORG_FG_PAT }}
221- TEST_USER_USER_FG_PAT : ${{ secrets.TEST_USER_USER_FG_PAT }}
222- TEST_USER_PAT : ${{ secrets.TEST_USER_PAT }}
193+ TestSecrets : ${{ secrets.TestSecrets }}
223194 needs :
224195 - Get-Settings
225196 - Test-ModuleLocal
0 commit comments