Update upload-artifact to v7 and pin version correctly#2306
Update upload-artifact to v7 and pin version correctly#2306AndreasTu wants to merge 2 commits intospockframework:masterfrom
Conversation
Fixes the workflow files after update with commit 2db4303.
📝 WalkthroughWalkthroughUpdated GitHub Actions workflows to bump the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/docs-pr.yaml (1)
36-40: Inconsistentactions/checkoutversions across jobs.The
check_yaml_consistencyjob usesactions/checkout@v4(line 23), while this job usesactions/checkout@v6(line 38). The latest version ofactions/checkoutis v6.0.2. Consider aligning both jobs to the same version for consistency.Note: This file is auto-generated from Kotlin DSL (
.github/workflows/docs-pr.main.kts), so the fix should be applied in the source file.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/docs-pr.yaml around lines 36 - 40, Update the inconsistent actions/checkout version in the workflow source: in the Kotlin DSL generator file (.github/workflows/docs-pr.main.kts) locate the checkout steps for both jobs (the step in the check_yaml_consistency job that currently uses actions/checkout@v4 and the step with id 'step-0' that uses actions/checkout@v6) and standardize them to the latest release (v6.0.2) so both jobs use actions/checkout@v6; modify the checkout configuration in the DSL (not the generated YAML) so future generations keep the versions aligned.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/docs-pr.yaml:
- Line 54: Replace the nonexistent actions/upload-artifact@v7 with
actions/upload-artifact@v6 and align the checkout action versions so they are
consistent (change either actions/checkout@v4 or actions/checkout@v6 so both
usages use the same tag, preferably actions/checkout@v6); update any workflow
comments or notes about runner/Node.js requirements if present to reflect v6's
requirements.
---
Nitpick comments:
In @.github/workflows/docs-pr.yaml:
- Around line 36-40: Update the inconsistent actions/checkout version in the
workflow source: in the Kotlin DSL generator file
(.github/workflows/docs-pr.main.kts) locate the checkout steps for both jobs
(the step in the check_yaml_consistency job that currently uses
actions/checkout@v4 and the step with id 'step-0' that uses actions/checkout@v6)
and standardize them to the latest release (v6.0.2) so both jobs use
actions/checkout@v6; modify the checkout configuration in the DSL (not the
generated YAML) so future generations keep the versions aligned.
| - id: 'step-4' | ||
| name: 'Archive and upload docs' | ||
| uses: 'actions/upload-artifact@v6' | ||
| uses: 'actions/upload-artifact@v7' |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Query GitHub API for upload-artifact tags
gh api repos/actions/upload-artifact/tags --jq '.[].name' 2>/dev/null | head -20Repository: spockframework/spock
Length of output: 176
🌐 Web query:
actions/upload-artifact v7 release GitHub Actions
💡 Result:
As of February 26, 2026, there is no actions/upload-artifact@v7 release/tag in the official repository—latest major is v6 (released Dec 12, 2025). [1]
What to use instead
- Use:
actions/upload-artifact@v6(or pin tov6.0.0). [1] v6changes: runs on Node.js 24 (runs.using: node24) and requires GitHub Actions Runner ≥ 2.327.1 (important for self-hosted runners). [2]
Example
- uses: actions/upload-artifact@v6
with:
name: my-artifact
path: path/to/files/Sources
[1] actions/upload-artifact tags list (shows latest tags; no v7)
[2] v6.0.0 release notes (Node 24 + runner minimum)
🏁 Script executed:
cat -n .github/workflows/docs-pr.yaml | sed -n '20,60p'Repository: spockframework/spock
Length of output: 1538
Replace actions/upload-artifact@v7 with v6—v7 does not exist.
As of February 2026, actions/upload-artifact@v7 has not been released. The latest major version is v6 (December 2025), which requires Node.js 24 and GitHub Actions Runner ≥ 2.327.1. The workflow will fail with the current v7 reference.
Additionally, the workflow has a version inconsistency: actions/checkout@v4 on line 23 and actions/checkout@v6 on line 38. Align both to use the same checkout version, preferably v6.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/docs-pr.yaml at line 54, Replace the nonexistent
actions/upload-artifact@v7 with actions/upload-artifact@v6 and align the
checkout action versions so they are consistent (change either
actions/checkout@v4 or actions/checkout@v6 so both usages use the same tag,
preferably actions/checkout@v6); update any workflow comments or notes about
runner/Node.js requirements if present to reflect v6's requirements.
Greptile SummaryThis PR updates Critical Issue:
Confidence Score: 1/5
Important Files Changed
Last reviewed commit: 7c1f819 |
| - id: 'step-4' | ||
| name: 'Archive and upload docs' | ||
| uses: 'actions/upload-artifact@v6' | ||
| uses: 'actions/upload-artifact@v7' |
There was a problem hiding this comment.
The Kotlin DSL file (.github/workflows/docs-pr.main.kts) constrains upload-artifact to version [v5,7.0), which excludes v7. When the check_yaml_consistency job runs, it will regenerate this YAML from the Kotlin DSL and produce v6 instead of v7, causing the consistency check to fail. Update line 27 in the Kotlin DSL file to allow v7:
| uses: 'actions/upload-artifact@v7' | |
| @file:DependsOn("actions:upload-artifact___major:[v5,v8-alpha)") |
|
@leonard84 It tries to auto-upgrade the version to v7, because the version range was |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2306 +/- ##
=========================================
Coverage 82.13% 82.13%
- Complexity 4793 4794 +1
=========================================
Files 469 469
Lines 14958 14958
Branches 1888 1888
=========================================
Hits 12286 12286
Misses 1984 1984
Partials 688 688 🚀 New features to boost your workflow:
|
Updates upload-artifacts to version v7 and pins the used version range correctly to prevent auto-upgrade to a newer major version next time.
Summary by CodeRabbit