🌟 [Major]: Reusable workflows now use GitHub App orchestration and explicit publish credentials - #408
Merged
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Prefer caller-provided GH_TOKEN/GITHUB_TOKEN for GitHub API/CLI calls while keeping github.token fallback for compatibility. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Remove github.token fallbacks from GitHub-facing composite actions so reusable workflow paths require explicit app-token env wiring. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
For GitHub App-enabled workflow/action paths, remove dual-token env usage and keep explicit GH_TOKEN-only wiring with no github.token fallback. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Mint an installation token in Build-Module.yml (same pinned actions/create-github-app-token@fee1f7d... as Plan and Publish-Module) and inject it as GH_TOKEN on the Build-PSModule step. This covers the three gh repo view calls in Build-PSModuleManifest.ps1 that read repo description, topics, and URL — all of which go through the gh CLI and therefore consume GH_TOKEN. The job-level GH_TOKEN: github.token fallback is removed. workflow.yml is updated to pass the GitHubAppClientId and GitHubAppPrivateKey secrets into the Build-Module reusable workflow. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Each token-minting step now requests only the permissions the job actually exercises and restricts the token to the current repository. Plan: repositories: current repo permission-contents: read (gh release list in Resolve-Version) permission-pull-requests: write (label/comment via Get-PSModuleSettings) Publish-Module: repositories: current repo permission-contents: write (gh release create/upload/delete) permission-pull-requests: write (gh pr comment) Build-Module: repositories: current repo (no permission-* needed - only gh repo view which uses metadata:read, auto-granted to all GitHub App installations) This limits blast radius: even if a compromised step obtained GH_TOKEN, it could only act on the one repository and only with the declared permission level, not on every repo in the installation. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Map Shelly's repository secrets into the generic GitHub App reusable-workflow contract in the test callers and documented example. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
## Summary - port the durable GitHub App authentication guidance into the Process-PSModule canonical docs tree - document the required `GitHubAppClientId` / `GitHubAppPrivateKey` reusable-workflow boundary and caller mapping - document the Plan, Build-Module, and Publish-Module repository scope, minimum permissions, and step-scoped `GH_TOKEN` injection implemented by #408 ## Stack - Stacked on #408 (`github-app-planning`) ## Validation - `git diff --check` --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
Route the release action through Shelly's scoped installation token and update every canonical workflow example for the required GitHub App secrets. Document the separate Dependabot secret requirement. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Distinguish the GitHub App installation permissions from caller github.token permissions and document the Dependabot private-key trust boundary. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
8 tasks
Document the required Dependabot secret mappings and their pre-review trust boundary. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Replace the ambiguous APIKey workflow secret with PSGALLERY_API_KEY across the reusable workflow contract, test callers, and documentation. Keep the Publish-PSModule action input unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
6 tasks
Upgrade create-github-app-token to pinned v3 and use its client-id input, matching the reusable workflow credential contract. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Nest the Markdown line-length setting under MD013 so Super-Linter applies the repository limit to generated help files. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Make PSGALLERY_API_KEY explicit across Process-PSModule documentation while retaining the Publish-PSModule action input name as APIKey. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Rename the Publish-PSModule action input and environment variable to PSGALLERY_API_KEY while retaining the PowerShell cmdlet parameter name. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Identify the pinned actions/create-github-app-token release as v3.2.0 in workflow and documentation references. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Document the latest-release SHA pinning pattern without hard-coding a release in the authentication guide. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep GitHub App and publishing credential guidance in the canonical documentation tree instead of the repository root README. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Marius Storhaug (MariusStorhaug)
marked this pull request as ready for review
August 9, 2026 13:58
Marius Storhaug (MariusStorhaug)
requested a review
from a team
as a code owner
August 9, 2026 13:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Process-PSModule now performs repository inspection, versioning, release management, and pull-request feedback through a configured GitHub App. Publishing uses the explicit
PSGALLERY_API_KEYcredential consistently from the reusable workflow through the publishing action.Breaking Changes
Caller workflows must now pass GitHub App credentials and the PowerShell Gallery credential through the reusable workflow contract. Workflows that omit these required secrets fail before their dependent stages run.
The caller can retain any local GitHub App secret names; only the reusable-workflow boundary names are fixed.
PSGALLERY_API_KEYis also the input name of the publishing action.Changed: Scoped GitHub automation
Every GitHub-dependent stage now mints a short-lived token for the triggering repository and requests only the access it needs. Version planning reads repository and pull-request data, builds read repository metadata, and publishing creates releases, uploads assets, cleans prereleases, and posts pull-request comments through the configured App.
The GitHub App installation needs Contents: write and Pull requests: write. Metadata: read is granted automatically. Permissions such as Actions, Statuses, Pages, and ID tokens remain part of the caller workflow's default
github.tokenpath and are not App permissions.Technical Details
actions/create-github-app-token.GH_TOKEN; the GitHub App path has nogithub.tokenfallback.PSGALLERY_API_KEY.Related issues