chore: upgrade deprecated CI actions and default Node to 22#174
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR updates the CI workflows to use Node.js 22 by default and upgrades two deprecated GitHub Actions (semantic-release and Docker Hub description) to their latest major versions, simplifying configuration in the process. Sequence diagram for updated release workflow with Semantic Release v6 and Node 22sequenceDiagram
actor Developer
participant GitHub as GitHub
participant ReleaseWorkflow as ReleaseWorkflow_CI
participant Node22Env as Node22Environment
participant SemanticRelease as SemanticReleaseActionV6
participant GitHubReleases as GitHubReleases
participant NpmRegistry as NpmRegistry
participant DockerHubAction as DockerHubDescriptionActionV5
participant DockerHub as DockerHub
Developer->>GitHub: Push to main or create tag
GitHub->>ReleaseWorkflow: Trigger release workflow
ReleaseWorkflow->>Node22Env: Set up Node 22 runtime
ReleaseWorkflow->>SemanticRelease: Run semantic release
SemanticRelease->>GitHubReleases: Create or update release
SemanticRelease->>NpmRegistry: Publish package
SemanticRelease->>GitHub: Push changelog and tags
ReleaseWorkflow->>DockerHubAction: Update Docker Hub description
DockerHubAction->>DockerHub: Apply new repository description
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
- Upgrade cycjimmy/semantic-release-action from v4 to v6 (Node 24 support) - Upgrade peter-evans/dockerhub-description from v4 to v5 (Node 24 support) - Update default NODE_VERSION from 20 to 22 across all workflows - Remove semantic_version override (v6 bundles semantic-release 25) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
3e155ae to
d37a045
Compare
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path=".github/workflows/release.yml" line_range="208" />
<code_context>
- name: 📝 Update Docker Hub Description
- uses: peter-evans/dockerhub-description@v4
+ uses: peter-evans/dockerhub-description@v5
with:
username: ${{ secrets.DOCKER_USERNAME }}
</code_context>
<issue_to_address>
**🚨 suggestion (security):** Consider pinning third-party actions to a commit SHA for stronger supply-chain security.
These workflows currently use major-version tags (e.g., `@v5`). For release- and publish-related jobs, please pin third-party actions to an exact commit SHA (with an inline comment for the version, if helpful) to reduce the risk of upstream tag changes impacting your workflow unexpectedly.
Suggested implementation:
```
- name: 📝 Update Docker Hub Description
# Pin to a specific commit SHA for supply-chain security (v5.x)
uses: peter-evans/dockerhub-description@<COMMIT-SHA-HERE> # v5
```
1. Replace `<COMMIT-SHA-HERE>` with the exact commit SHA of the desired `peter-evans/dockerhub-description` v5 release (e.g., from the v5.0.0 or v5.x tag in the repository).
2. For consistency with your comment, consider also pinning other third-party actions in this workflow (e.g., `cycjimmy/semantic-release-action@v6`) to their corresponding commit SHAs using the same pattern and inline version comments.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
|
||
| - name: 📝 Update Docker Hub Description | ||
| uses: peter-evans/dockerhub-description@v4 | ||
| uses: peter-evans/dockerhub-description@v5 |
There was a problem hiding this comment.
🚨 suggestion (security): Consider pinning third-party actions to a commit SHA for stronger supply-chain security.
These workflows currently use major-version tags (e.g., @v5). For release- and publish-related jobs, please pin third-party actions to an exact commit SHA (with an inline comment for the version, if helpful) to reduce the risk of upstream tag changes impacting your workflow unexpectedly.
Suggested implementation:
- name: 📝 Update Docker Hub Description
# Pin to a specific commit SHA for supply-chain security (v5.x)
uses: peter-evans/dockerhub-description@<COMMIT-SHA-HERE> # v5
- Replace
<COMMIT-SHA-HERE>with the exact commit SHA of the desiredpeter-evans/dockerhub-descriptionv5 release (e.g., from the v5.0.0 or v5.x tag in the repository). - For consistency with your comment, consider also pinning other third-party actions in this workflow (e.g.,
cycjimmy/semantic-release-action@v6) to their corresponding commit SHAs using the same pattern and inline version comments.
There was a problem hiding this comment.
Pull request overview
Updates GitHub Actions workflows to use a newer default Node.js version and newer third-party actions to avoid runtime deprecation warnings and keep CI tooling current.
Changes:
- Bump default
NODE_VERSIONfrom 20 → 22 in multiple workflows (release, main CI, CodeQL, WordPress compatibility). - Upgrade
cycjimmy/semantic-release-actionfromv4→v6(and remove the now-unneededsemantic_versionpin). - Upgrade
peter-evans/dockerhub-descriptionfromv4→v5.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/wordpress-compatibility.yml | Switch workflow default Node version to 22. |
| .github/workflows/release.yml | Default Node 22 + upgrade semantic-release and Docker Hub description actions. |
| .github/workflows/main-ci.yml | Switch workflow default Node version to 22 (while keeping the matrix on 20 & 22). |
| .github/workflows/codeql-analysis.yml | Switch workflow default Node version to 22. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| env: | ||
| NODE_VERSION: "20" | ||
| NODE_VERSION: "22" | ||
| NODE_OPTIONS: "--max-old-space-size=8192" |
Summary
cycjimmy/semantic-release-actionfrom v4 to v6 (fixes Node.js 20 deprecation warning, bundles semantic-release 25)peter-evans/dockerhub-descriptionfrom v4 to v5 (Node 24 support)NODE_VERSIONfrom 20 to 22 across all CI workflows (release, main-ci, codeql, wordpress-compat)Test plan
🤖 Generated with Claude Code
Summary by Sourcery
Update CI workflows to use Node.js 22 by default and refresh deprecated GitHub Actions used in the release pipeline.
Build: