chore(github): update the shared workflow actions to their current majors - #48
Conversation
…jors Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the GitHub Actions used by this org’s reusable workflows to newer major versions (primarily actions/checkout@v7 and actions/setup-node@v7), and adjusts release-drafter usage for its v7 input changes.
Changes:
- Bump
actions/checkoutfromv6→v7across multiple reusable workflows. - Bump
actions/setup-nodefromv6→v7across the Node-based reusable workflows. - Update other workflow actions to new majors (
actions/stale@v11,actions/labeler@v7,release-drafter@v7,create-pull-request@v8), including therelease-draftertoken input migration.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/update-version.yml | Bumps actions/checkout to v7 for the version update reusable workflow. |
| .github/workflows/update-beta-version.yml | Bumps checkout/setup-node to v7 in the beta version update workflow. |
| .github/workflows/sync-github-release.yml | Bumps actions/checkout to v7 before generating/updating GitHub releases. |
| .github/workflows/stale.yml | Bumps actions/stale to v11. |
| .github/workflows/release-drafter.yml | Bumps release-drafter to v7 and passes the token via with: token. |
| .github/workflows/publish-release.yml | Bumps checkout/setup-node to v7 in publish/release reusable workflow jobs. |
| .github/workflows/promote-branch.yml | Bumps checkout to v7 and create-pull-request to v8 for promotion PR automation. |
| .github/workflows/pre-release.yml | Bumps actions/checkout to v7 for the prerelease workflow. |
| .github/workflows/npm-publish.yml | Bumps checkout/setup-node to v7 for npm publishing (token-based). |
| .github/workflows/npm-publish-oidc.yml | Bumps checkout/setup-node to v7 for npm publishing (OIDC). |
| .github/workflows/npm-publish-esm.yml | Bumps checkout/setup-node to v7 for ESM npm publishing (token-based). |
| .github/workflows/npm-publish-esm-oidc.yml | Bumps checkout/setup-node to v7 for ESM npm publishing (OIDC). |
| .github/workflows/nodejs-build-and-test.yml | Bumps checkout/setup-node to v7 in the shared CI workflow. |
| .github/workflows/lint-docs.yml | Bumps checkout/setup-node to v7 in the TypeDoc lint workflow. |
| .github/workflows/labeler.yml | Bumps actions/labeler to v7. |
| .github/workflows/homebridge-beta-bot.yml | Bumps checkout/setup-node to v7 in the beta bot workflow. |
| .github/workflows/eslint.yml | Bumps checkout/setup-node to v7 in the shared ESLint workflow. |
| .github/workflows/determine-release-type.yml | Bumps actions/checkout to v7 in release-type determination. |
| .github/workflows/codeql-analysis.yml | Bumps actions/checkout to v7 for CodeQL analysis workflow. |
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Good catch on the scope — that one was a genuine miss on my part. I globbed
Both are I checked the other actions in On the two token comments — both are fair, and both describe behaviour that predates this PR rather than anything it introduces:
Both look like real bugs and the fix in each case is a fallback to |
|
Raised the two token issues separately as #50, so they can be reviewed on their own rather than inside a version bump. While writing it I audited every workflow here that declares a |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 21 out of 21 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (3)
.github/workflows/stale.yml:35
secrets.tokenis declared as optional for this reusable workflow, but it’s always used asrepo-token. If the caller doesn’t pass the secret, this will evaluate to an empty string and the stale action will fail authentication. Either make the secret required or fall back to the built-ingithub.tokenwhen it’s not provided.
- uses: actions/stale@v11
with:
repo-token: ${{ secrets.token }}
.github/workflows/promote-branch.yml:22
- This workflow uses
secrets.GITHUB_TOKENto create a pull request, but it doesn’t declare anypermissions. With GitHub’s increasingly common read-only default token permissions,create-pull-requestcan fail unless the caller sets write permissions. Setting explicit job permissions here makes the reusable workflow self-contained and less brittle.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
.github/workflows/release-drafter.yml:14
release-drafterneeds write access to repository contents (and typically read access to PRs) when usingGITHUB_TOKEN. This reusable workflow doesn’t declarepermissions, so it relies on the caller/repo defaults and may break under read-only defaults. Adding explicit permissions here prevents surprising failures when upgrading action majors.
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v7
Brings the actions used by the shared workflows up to their current major versions. Several were a major behind, and
create-pull-requestwas two.Worth noting: the plugin repos were already on
actions/checkout@v7andactions/setup-node@v7in their own workflows, so the shared workflows had drifted behind the repos that call them, and the org was effectively running two versions side by side.What changed
actions/checkoutactions/setup-nodeactions/stalestale.ymlactions/labelerlabeler.ymlrelease-drafter/release-drafterrelease-drafter.ymlpeter-evans/create-pull-requestpromote-branch.ymlOn the breaking changes
I read the release notes for each major rather than bumping blind:
ubuntu-latest, so it does not apply — I checked, there are no self-hosted runners in this repo.tokeninput that replaces theGITHUB_TOKENenv var the action used to read, sorelease-drafter.ymlnow passes the secret as an input rather than an env var. Everything else about that workflow is unchanged.Nothing else needed adjusting — no input names, defaults or behaviour changed in the rest.
Everything already current, for completeness
actions/upload-artifact@v7,actions/download-artifact@v8,github/codeql-action@v4,coverallsapp/github-action@v2,softprops/action-gh-release@v3,viperproject/create-nightly-release@v2,sarisia/actions-status-discord@v1,martinbeentjes/npm-get-version-action@v1.3.1,peter-evans/create-issue-from-file@v6,dropseed/changerelease@v1,TriPSs/conventional-changelog-action@v6,TimonVS/pr-labeler-action@v5.Testing
These are reusable workflows, so the real proof is the first run of each caller. The two with the widest blast radius are
eslint.ymlandnodejs-build-and-test.yml, which every@homebridge-pluginsrepo now calls — those will exercisecheckout@v7andsetup-node@v7immediately.The riskiest by scope is
promote-branch.yml, since it is the least frequently run and jumps two majors. Worth a deliberate look the first time it fires.