Skip to content

Use consistent versions for the checkout action#2319

Open
Vampire wants to merge 1 commit intomasterfrom
vampire/use-consistent-checkout-action
Open

Use consistent versions for the checkout action#2319
Vampire wants to merge 1 commit intomasterfrom
vampire/use-consistent-checkout-action

Conversation

@Vampire
Copy link
Member

@Vampire Vampire commented Mar 13, 2026

Summary by CodeRabbit

  • Chores
    • Updated GitHub Actions workflows to use checkout action v6, upgraded from v4
    • Enhanced workflow configuration with improved consistency check job handling across multiple CI/CD pipelines

Copy link
Member Author

Vampire commented Mar 13, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@coderabbitai
Copy link

coderabbitai bot commented Mar 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 706f644b-8bc2-4a8b-bb38-f91f980f7be5

📥 Commits

Reviewing files that changed from the base of the PR and between 9c6342c and 8211655.

📒 Files selected for processing (8)
  • .github/workflows/branches-and-prs.main.kts
  • .github/workflows/branches-and-prs.yaml
  • .github/workflows/codeql-analysis.main.kts
  • .github/workflows/codeql-analysis.yaml
  • .github/workflows/docs-pr.main.kts
  • .github/workflows/docs-pr.yaml
  • .github/workflows/release.main.kts
  • .github/workflows/release.yaml

📝 Walkthrough

Walkthrough

Updates GitHub Actions workflows across six files to upgrade the checkout action from v4 to v6. Adds configuration imports to four Kotlin workflow definition files to support classpath-inferred checkout action versions through DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG and CheckoutActionVersionSource.InferFromClasspath.

Changes

Cohort / File(s) Summary
YAML Workflow Files
.github/workflows/branches-and-prs.yaml, .github/workflows/codeql-analysis.yaml, .github/workflows/docs-pr.yaml, .github/workflows/release.yaml
Upgraded checkout action from actions/checkout@v4 to actions/checkout@v6 in the first job's checkout step across all files.
Kotlin Workflow Configuration Files
.github/workflows/branches-and-prs.main.kts, .github/workflows/codeql-analysis.main.kts, .github/workflows/docs-pr.main.kts, .github/workflows/release.main.kts
Added imports for CheckoutActionVersionSource.InferFromClasspath and DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG. Introduced consistencyCheckJobConfig parameter in workflow builders, copying DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG with checkoutActionVersion set to InferFromClasspath().

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Six workflows hop and dance,
From v4 to v6's advance!
Classpath whispers secrets true,
Actions checked, now fresh and new—
The rabbit bounces with delight! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main change: upgrading the checkout action from v4 to v6 across multiple workflow files and adding configuration for consistent version handling.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch vampire/use-consistent-checkout-action
📝 Coding Plan
  • Generate coding plan for human review comments

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.

@greptile-apps
Copy link

greptile-apps bot commented Mar 13, 2026

Greptile Summary

This PR resolves a version inconsistency in the auto-generated check_yaml_consistency job across all four GitHub Actions workflows. Previously, the github-workflows-kt library was emitting a hardcoded actions/checkout@v4 reference for that job, while all user-defined jobs were already using actions/checkout@v6 (declared via @file:DependsOn("actions:checkout___major:[v6,v7-alpha)")). By adding consistencyCheckJobConfig = DEFAULT_CONSISTENCY_CHECK_JOB_CONFIG.copy(checkoutActionVersion = InferFromClasspath()) to each workflow() call, the library now resolves the checkout version from the classpath, producing v6 uniformly.

Key changes:

  • All four *.main.kts files (branches-and-prs, codeql-analysis, docs-pr, release) add consistencyCheckJobConfig with InferFromClasspath() to instruct the generator to use the classpath-declared checkout version.
  • All four corresponding *.yaml files are regenerated, updating the check_yaml_consistency job's checkout step from actions/checkout@v4 to actions/checkout@v6.
  • No logic changes are made; this is purely a tooling/version consistency fix.

Confidence Score: 5/5

  • This PR is safe to merge — it is a targeted, non-breaking consistency fix with no logic changes.
  • The change is minimal and mechanical: it adds a single configuration option to four Kotlin DSL workflow scripts and regenerates the corresponding YAML files. The InferFromClasspath() pattern correctly ties the auto-generated consistency-check job's checkout version to the same v6 already declared in @file:DependsOn. All four workflows are updated consistently, no v4 references remain in any YAML file, and common.main.kts has no checkout references. No logic, secrets handling, or runtime behavior is altered.
  • No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/branches-and-prs.main.kts Adds consistencyCheckJobConfig with InferFromClasspath() so the auto-generated consistency job uses actions/checkout@v6 (resolved from the existing @file:DependsOn declaration) rather than a library-default hardcoded version.
.github/workflows/branches-and-prs.yaml Regenerated YAML — updates check_yaml_consistency job's checkout step from actions/checkout@v4 to actions/checkout@v6, now consistent with all other jobs in this workflow.
.github/workflows/codeql-analysis.main.kts Same InferFromClasspath() addition as other .kts files; ensures the consistency check job for the CodeQL workflow resolves actions/checkout from the declared classpath dependency (v6).
.github/workflows/codeql-analysis.yaml Regenerated YAML — updates the consistency check job's checkout step from v4 to v6, no other changes.
.github/workflows/docs-pr.main.kts Same InferFromClasspath() addition applied uniformly to the docs-pr workflow.
.github/workflows/docs-pr.yaml Regenerated YAML — updates the consistency check job's checkout step from v4 to v6.
.github/workflows/release.main.kts Adds consistencyCheckJobConfig alongside the existing sourceFile = __FILE__ parameter; same InferFromClasspath() pattern applied to the release workflow.
.github/workflows/release.yaml Regenerated YAML — updates the consistency check job's checkout step from v4 to v6.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["*.main.kts script runs"] --> B["github-workflows-kt generates YAML"]
    B --> C{checkoutActionVersion source?}
    C -- "Before PR (default)" --> D["Hardcoded: actions/checkout@v4"]
    C -- "After PR (InferFromClasspath)" --> E["Resolved from @file:DependsOn\nactions:checkout___major:[v6,v7-alpha)"]
    E --> F["actions/checkout@v6"]
    D --> G["check_yaml_consistency job\nuses checkout@v4"]
    F --> H["check_yaml_consistency job\nuses checkout@v6"]
    H --> I["✅ Consistent with all other jobs\nin the workflow (also v6)"]
    G --> J["❌ Inconsistent: other jobs use v6,\nconsistency check used v4"]
Loading

Last reviewed commit: 8211655

@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.16%. Comparing base (9c6342c) to head (8211655).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #2319      +/-   ##
============================================
- Coverage     82.16%   82.16%   -0.01%     
+ Complexity     4822     4821       -1     
============================================
  Files           472      472              
  Lines         15036    15036              
  Branches       1905     1905              
============================================
- Hits          12355    12354       -1     
  Misses         1989     1989              
- Partials        692      693       +1     

see 1 file with indirect coverage changes

🚀 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