ci(actions): upgrade actions and adopt prek - #304
Conversation
# 🔧 CI/CD - Upgrade Python, Node.js, cache, and GitHub Pages actions to current major versions. - Replace pre-commit/action with j178/prek-action v3.0.0 using its default all-files checks. - Limit CI push and pull request branch filters to main. ## Validation - Pass pre-commit run --all-files --show-diff-on-failure. - Pass prek run --all-files in an isolated repository snapshot. - Validate workflow YAML and git diff --check.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
| - name: Run prek | ||
| uses: j178/prek-action@v3.0.0 |
There was a problem hiding this comment.
Keep workflow actions current, use
prekto instead ofpre-commitin ci, it's faster thanpre-commitand more efficient in disk space usage, also fully compatible with the original pre-commit configurations and hooks.
可以,我觉得没问题,兼容性上应该是没问题的
There was a problem hiding this comment.
🟢 Approval recommended
The changes are limited to workflow configuration updates with valid action versions and no application/runtime code impact.
Pull request overview
This PR updates the repository’s GitHub Actions workflows by upgrading several official actions, switching the CI lint job from pre-commit/action to j178/prek-action, and narrowing CI triggers to only run for main.
Changes:
- Upgrade workflow actions used by CI and GitHub Pages (e.g., checkout/setup-python/setup-node/cache/pages actions).
- Replace
pre-commit/actionwithj178/prek-action@v3.0.0for running the existing pre-commit configuration viaprek. - Restrict
push/pull_requestbranch filters in CI tomainonly.
File summaries
| File | Description |
|---|---|
| .github/workflows/deploy-docs.yml | Upgrades GitHub Pages-related actions and Node/Python setup actions for the docs deployment pipeline. |
| .github/workflows/ci.yml | Restricts CI triggers to main, upgrades actions, and adopts j178/prek-action for hook execution. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟡 Changes recommended
Multiple workflows reference action major versions that do not appear to exist (e.g., actions/setup-python@v7, actions/setup-node@v7, actions/cache@v6, and several Pages actions), which will cause CI/docs deployments to fail.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Lite
What
Upgrade the actions used by CI and GitHub Pages, replace
pre-commit/actionwithj178/prek-action, and restrict CI push/PR branch filters tomain.Why
Keep workflow actions current, use
prekto instead ofpre-commitin ci, it's faster thanpre-commitand more efficient in disk space usage, also fully compatible with the original pre-commit configurations and hooks.How
Update
setup-pythonto v7,setup-nodeto v7,cacheto v6,configure-pagesto v6,upload-pages-artifactto v5, anddeploy-pagesto v5.Use
j178/prek-action@v3.0.0to run the existing.pre-commit-config.yaml.Remove
developfrom the CI push and pull-request branch filters.Testing
prek run --all-filespassespre-commit run --all-filespassespytest tests/)Type of Change
Screenshots / Logs