ci: pin action SHAs to latest and fix devportal docs publishing#71
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the repository’s CI/CD workflows to improve supply-chain security and to correct/refresh DevPortal docs publishing behavior (both for rolling docs-latest and for versioned vX.Y.Z releases).
Changes:
- Pin third-party GitHub Actions to immutable commit SHAs across workflows and the local composite action, and tighten default workflow permissions.
- Adjust the release pipeline to use a GitHub App token (instead of
GITHUB_TOKEN) so tag pushes can trigger downstream workflows, and update the semantic-release bump commit message to avoid[skip ci]. - Update the DevPortal docs workflow triggers to run on
mainpushes (refreshdocs-latest) and onv*tags (attachdevportal-docs.tar.gzto versioned releases), and bump Node to24.xin that workflow.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
pyproject.toml |
Updates semantic-release bump commit message to avoid suppressing GitHub Actions runs. |
.github/workflows/publish-devportal-docs.yml |
Runs docs publish on main and v* tags; pins actions; bumps Node to 24.x; targets stable DevPortal action ref. |
.github/workflows/gh-pages.yaml |
Adds least-privilege default permissions and pins actions to SHAs. |
.github/workflows/ci.yaml |
Adds least-privilege default permissions and pins actions to SHAs. |
.github/workflows/cd.yaml |
Switches release automation to a GitHub App token; pins actions; tightens top-level permissions; pins publishing actions. |
.github/actions/build-documentation/action.yml |
Pins internal composite action dependencies (setup-python/node/pnpm, upload-pages-artifact) to SHAs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
joe-p
approved these changes
May 28, 2026
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.
Summary
This PR makes a few related CI/CD changes:
permissionsto least privilege.devportal-docs.tar.gzasset is attached to eachvX.Y.Zrelease, not only to the rollingdocs-latestpre-release. This required switching the release pipeline to a GitHub App token and removing a[skip ci]directive.docs-latestbuild on every push tomain.Changes
CI security hardening
# vXcomments) instead of mutable tags, incd.yaml,ci.yaml,gh-pages.yaml,publish-devportal-docs.yml, and the local composite action.github/actions/build-documentation/action.yml. First-party refs stay as-is per policy: the DevPortal action remains on@release/ak-v4, and the local./.github/actions/build-documentationreference is unchanged (its internal actions are pinned).actions/checkoutv4 to v6,actions/setup-pythonv5 to v6,actions/setup-nodev4 to v6,pnpm/action-setupv4 to v6,actions/upload-artifactv4 to v7,actions/upload-pages-artifactv3 to v5, andactions/deploy-pagesv4 to v5.python-semantic-releasefrom@mastertov10.5.3, andpypa/gh-action-pypi-publishfrom@release/v1tov1.14.0. Updates now come via manual bumps, or via Dependabot if thegithub-actionsecosystem is added to.github/dependabot.yml.actions/create-github-app-tokenis added (see DevPortal section) and pinned atv3.permissionsto least privilege:cd.yaml: top-level reduced fromcontents: write+packages: readtocontents: read. Thereleasejob keeps its own block (id-token: write,contents: write,packages: read), which is what it needs.ci.yaml: add a top-levelpermissions: contents: read(it previously had none).gh-pages.yaml: add a top-levelpermissions: contents: read. The publish job keepscontents: read+pages: write+id-token: write(job-level permissions replace the default, so thecontents: readthere is required, not redundant).publish-devportal-docs.yml: top-levelcontents: writekept (single job that creates GitHub Releases).DevPortal docs publishing
cd.yaml: switch the release pipeline fromsecrets.GITHUB_TOKENto a GitHub App token (actions/create-github-app-tokenwithBOT_ID/BOT_SK) for both the checkout and thepython-semantic-releasestep. Tags pushed withGITHUB_TOKENdo not trigger downstreamon: push: tagsworkflows, so the versioneddevportal-docs.tar.gzwas never built. App-token pushes do trigger them.pyproject.toml: change the python-semantic-releasecommit_messagefrom[skip ci]toskip-checks: true.[skip ci]on the release bump commit was suppressing the tag-push run ofpublish-devportal-docs.yml(the tag points to that commit), so novX.Y.Zrelease ever had the tarball.skip-checks: trueis not honored by GitHub Actions as a skip, so the tag push now fires the workflow and attaches the asset.publish-devportal-docs.yml: replace the trigger (previouslytags: ['v*']only, with the publish action pointed at the now-deletedci/update-publish-devportal-docs-workflowbranch) withpush: branches: [main]plustags: ['v*'], and point the action atrelease/ak-v4. Also align Node to 24.x and normalize indentation. This refreshes the rollingdocs-latestpre-release on every merge tomain, while tag pushes attachdevportal-docs.tar.gzto the corresponding version release.Why
ubuntu-latest, so the higher minimum runner versions that the Node 24 bumps require are satisfied automatically.docs-latestrelease, which is only refreshed by non-tag runs. The workflow previously triggered on a temporary feature branch and only on tags, sodocs-latestwas never refreshed frommain. Triggering onmainkeeps it current.[skip ci]directive suppresses every workflow for that push, including the tag push, because the tag points to the bump commit. Combined with releasing viaGITHUB_TOKEN(which never triggers downstream workflows), that is why novX.Y.Zrelease had adevportal-docs.tar.gz. The App token andskip-checks: truetogether fix both halves.Notes
BOT_ID/BOT_SKsecrets, installed withcontents: write) is available on this repository. If it is not, theapp-tokenstep will fail.