Skip to content

ci: use shallow checkout for tag-push releases#8544

Open
myleshorton wants to merge 2 commits intomainfrom
ci/shallow-checkout-for-tag-releases
Open

ci: use shallow checkout for tag-push releases#8544
myleshorton wants to merge 2 commits intomainfrom
ci/shallow-checkout-for-tag-releases

Conversation

@myleshorton
Copy link
Contributor

Summary

  • Tag-push releases now use fetch-depth: 1 (shallow clone) instead of fetch-depth: 0 (full history) in the set-metadata job
  • Full clone is only needed for schedule/dispatch builds that call version.sh generate — tag pushes only call version.sh validate which doesn't need git history
  • Saves ~10 minutes on tag-push release checkout times

Test plan

  • Trigger a tag-push release and verify set-metadata checkout completes quickly
  • Trigger a manual dispatch build and verify version.sh generate still works (full clone preserved for that path)

🤖 Generated with Claude Code

The set-metadata job was doing fetch-depth: 0 with fetch-tags for all
trigger types, but tag-push releases only need version.sh validate
(no git history needed). Full clone only needed for schedule/dispatch
builds that call version.sh generate.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 19, 2026 02:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR optimizes the release workflow’s set-metadata job checkout behavior by using a shallow clone for tag-push releases, while keeping full-history checkout for scheduled/manual builds that generate versions.

Changes:

  • Switch actions/checkout to conditionally use fetch-depth: 1 for push (tag) events and fetch-depth: 0 otherwise.
  • Make fetch-tags conditional based on event type.

💡 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.

version.sh validate calls get_latest_version which needs git tag -l
to check the new version doesn't go backwards. Keep fetch-tags: true
for all trigger types; only the commit history (fetch-depth) is
conditionally shallow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

2 participants