@@ -48,7 +48,8 @@ permissions:
4848
4949jobs :
5050 Process-PSModule :
51- uses : PSModule/Process-PSModule/.github/workflows/workflow.yml@v5
51+ if : ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
52+ uses : PSModule/Process-PSModule/.github/workflows/workflow.yml@5a11e8e8b018faf97017e0416f136a751c026713 # v8.0.0
5253 secrets :
5354 PSGALLERY_API_KEY : ${{ secrets.PSGALLERY_API_KEY }}
5455 GitHubAppClientId : ${{ secrets.SHELLY_CLIENT_ID }}
@@ -67,6 +68,10 @@ the PowerShell Gallery, GitHub Releases, and tags, so later runs must queue rath
6768The reusable workflow uses its own prefixed concurrency group, so it cannot queue behind the caller while the caller
6869waits for it to finish.
6970
71+ The job condition skips fork-originated pull requests because GitHub does not expose the required repository secrets to
72+ forks. Use a separate secret-free, read-only workflow if the repository accepts contributions from forks and requires
73+ fork CI.
74+
7075# # Passing test data
7176
7277The reusable workflow at `.github/workflows/workflow.yml` declares four workflow-call secrets,
@@ -94,7 +99,8 @@ changes:
9499` ` ` yaml
95100jobs:
96101 Process-PSModule:
97- uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v5
102+ if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
103+ uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@5a11e8e8b018faf97017e0416f136a751c026713 # v8.0.0
98104 secrets:
99105 PSGALLERY_API_KEY: ${{ secrets.PSGALLERY_API_KEY }}
100106 GitHubAppClientId: ${{ secrets.SHELLY_CLIENT_ID }}
@@ -123,7 +129,8 @@ content lines stay at the same indentation level:
123129` ` ` yaml
124130jobs:
125131 Process-PSModule:
126- uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v5
132+ if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
133+ uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@5a11e8e8b018faf97017e0416f136a751c026713 # v8.0.0
127134 secrets:
128135 PSGALLERY_API_KEY: ${{ secrets.PSGALLERY_API_KEY }}
129136 GitHubAppClientId: ${{ secrets.SHELLY_CLIENT_ID }}
@@ -183,9 +190,9 @@ Notes:
183190- If using `secrets : inherit` in a caller workflow, remember that GitHub only forwards secrets that
184191 already exist by name. It does not assemble a `TestData` JSON payload from individual secrets such as
185192 ` TEST_USER_PAT` ; the caller must still create and pass the `TestData` value explicitly.
186- - Organization, repository and GitHub *Environment* secrets and variables are supported when they are
187- visible to the calling job. For environment-scoped values, set `environment:` on the calling job and
188- explicitly include those values in `TestData`; they are not exposed automatically .
193+ - Organization and repository secrets and variables are supported when they are visible to the calling job.
194+ GitHub Environment secrets are not supported by this caller contract because a job that calls a reusable
195+ workflow cannot declare `environment:` .
189196
190197# # Important file change detection
191198
@@ -235,7 +242,8 @@ You can also pass patterns via the workflow input:
235242` ` ` yaml
236243jobs:
237244 Process:
238- uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v5
245+ if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
246+ uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@5a11e8e8b018faf97017e0416f136a751c026713 # v8.0.0
239247 with:
240248 ImportantFilePatterns: |
241249 ^src/
@@ -248,7 +256,8 @@ To disable triggering via the workflow input, pass an explicit empty string:
248256` ` ` yaml
249257jobs:
250258 process:
251- uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v5
259+ if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
260+ uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@5a11e8e8b018faf97017e0416f136a751c026713 # v8.0.0
252261 with:
253262 ImportantFilePatterns: ''
254263` ` `
0 commit comments