Skip to content

Update upload-artifact to v7 and pin version correctly#2306

Open
AndreasTu wants to merge 2 commits intospockframework:masterfrom
AndreasTu:WorkflowFix
Open

Update upload-artifact to v7 and pin version correctly#2306
AndreasTu wants to merge 2 commits intospockframework:masterfrom
AndreasTu:WorkflowFix

Conversation

@AndreasTu
Copy link
Member

@AndreasTu AndreasTu commented Feb 26, 2026

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

  • Chores
    • Updated documentation archival workflow in CI to use the newer upload-artifact v7 action across related workflow configurations.

Fixes the workflow files after update with commit 2db4303.
@AndreasTu AndreasTu requested a review from leonard84 February 26, 2026 19:52
@AndreasTu AndreasTu self-assigned this Feb 26, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 26, 2026

📝 Walkthrough

Walkthrough

Updated GitHub Actions workflows to bump the actions/upload-artifact dependency versions in two workflow files; no other steps, paths, or control flow were changed.

Changes

Cohort / File(s) Summary
Workflow YAML
/.github/workflows/docs-pr.yaml
Changed actions/upload-artifact reference from v6 to v7 in the "Archive and upload docs" step.
Workflow Kotlin DSL
/.github/workflows/docs-pr.main.kts
Adjusted the upload-artifact dependency version range from [v5,7.0) to [v7,v8-alpha); no other workflow logic changes.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested reviewers

  • Vampire

Poem

🐰 A tiny hop, a gentle tweak,
I nudged the version up a peak,
Artifacts ride a newer breeze,
Through GitHub nights and CI trees,
Hooray — the docs will travel sleek! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title accurately summarizes the main change: updating the upload-artifact action to v7 and ensuring version pinning across workflow files.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/docs-pr.yaml (1)

36-40: Inconsistent actions/checkout versions across jobs.

The check_yaml_consistency job uses actions/checkout@v4 (line 23), while this job uses actions/checkout@v6 (line 38). The latest version of actions/checkout is 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.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 96ee85c and 7c1f819.

📒 Files selected for processing (1)
  • .github/workflows/docs-pr.yaml

- id: 'step-4'
name: 'Archive and upload docs'
uses: 'actions/upload-artifact@v6'
uses: 'actions/upload-artifact@v7'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 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 -20

Repository: 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 to v6.0.0). [1]
  • v6 changes: 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-apps
Copy link

greptile-apps bot commented Feb 26, 2026

Greptile Summary

This PR updates actions/upload-artifact from v6 to v7 in the workflow YAML file. However, the corresponding Kotlin DSL source file (.github/workflows/docs-pr.main.kts) was not updated to allow v7, as it currently constrains the version to [v5,7.0) (which excludes v7).

Critical Issue:

  • The check_yaml_consistency job will regenerate the YAML from the Kotlin DSL and detect a mismatch, causing the workflow to fail
  • The Kotlin DSL file must be updated first to allow v7 before updating the generated YAML file

Confidence Score: 1/5

  • This PR will fail the consistency check and should not be merged without fixing the Kotlin DSL file
  • The workflow file has a built-in consistency check that regenerates the YAML from the Kotlin DSL. Since the Kotlin DSL constrains upload-artifact to versions below v7, the consistency check will fail when it detects the mismatch between the manually edited YAML (v7) and the generated version (v6)
  • .github/workflows/docs-pr.main.kts needs to be updated to allow upload-artifact@v7 before this YAML change can work

Important Files Changed

Filename Overview
.github/workflows/docs-pr.yaml Updated actions/upload-artifact to v7, but the Kotlin DSL file was not updated to allow this version - will fail consistency check

Last reviewed commit: 7c1f819

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

- id: 'step-4'
name: 'Archive and upload docs'
uses: 'actions/upload-artifact@v6'
uses: 'actions/upload-artifact@v7'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Suggested change
uses: 'actions/upload-artifact@v7'
@file:DependsOn("actions:upload-artifact___major:[v5,v8-alpha)")

@AndreasTu
Copy link
Member Author

@leonard84 It tries to auto-upgrade the version to v7, because the version range was 7.0 instead of v7, which was released 1h ago, that's the reason why #2304 and master is suddenly failing.

@AndreasTu AndreasTu changed the title Fix Workflow files after update Update upload-artifact to v7 and pin version correctly Feb 26, 2026
@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.13%. Comparing base (96ee85c) to head (685458e).

Additional details and impacted files

Impacted file tree graph

@@            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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant