Skip to content

Commit 25b8c7e

Browse files
Document Process workflow fleet standard
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 64b640a commit 25b8c7e

6 files changed

Lines changed: 319 additions & 10 deletions

File tree

docs/content/get-started/repository-setup.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ permissions:
6565

6666
jobs:
6767
Process-PSModule:
68-
uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v5
68+
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
69+
uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@5a11e8e8b018faf97017e0416f136a751c026713 # v8.0.0
6970
secrets:
7071
PSGALLERY_API_KEY: ${{ secrets.PSGALLERY_API_KEY }}
7172
GitHubAppClientId: ${{ secrets.SHELLY_CLIENT_ID }}

docs/content/guides/calling-the-workflow.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ permissions:
4848

4949
jobs:
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
6768
The reusable workflow uses its own prefixed concurrency group, so it cannot queue behind the caller while the caller
6869
waits 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

7277
The reusable workflow at `.github/workflows/workflow.yml` declares four workflow-call secrets,
@@ -94,7 +99,8 @@ changes:
9499
```yaml
95100
jobs:
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
124130
jobs:
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
236243
jobs:
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
249257
jobs:
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
```

docs/content/guides/github-app-authentication.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ names. Map the caller's secrets explicitly:
2323
```yaml
2424
jobs:
2525
Process-PSModule:
26-
uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v5
26+
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
27+
uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@5a11e8e8b018faf97017e0416f136a751c026713 # v8.0.0
2728
secrets:
2829
PSGALLERY_API_KEY: ${{ secrets.PSGALLERY_API_KEY }}
2930
GitHubAppClientId: ${{ secrets.SHELLY_CLIENT_ID }}

0 commit comments

Comments
 (0)