Skip to content

ci: Fix docs release failing on detached HEAD#741

Open
vdusek wants to merge 1 commit intomasterfrom
fix/docs-release-detached-head
Open

ci: Fix docs release failing on detached HEAD#741
vdusek wants to merge 1 commit intomasterfrom
fix/docs-release-detached-head

Conversation

@vdusek
Copy link
Copy Markdown
Contributor

@vdusek vdusek commented Apr 18, 2026

Summary

The doc_release_post_publish job in on_master.yaml invokes manual_release_docs.yaml with a commit SHA as ref, so actions/checkout leaves the repo in a detached HEAD state. The hand-rolled Commit the updated package.json and lockfile step then runs git push, which fails with fatal: You are not currently on a branch. (see failing run). The push was also invoked unconditionally even when there was nothing to commit.

Fix

  • Replace the hand-rolled git block with EndBug/add-and-commit@v10 (matching manual_version_docs.yaml).
  • Set new_branch: ${{ github.event.repository.default_branch }} so the action creates/checks out a local default branch before committing. This is required because EndBug does not handle detached HEAD by itself — its default push is git push origin --set-upstream (no refspec), which fails the same way.
  • Apply the same new_branch fix to manual_version_docs.yaml, which has the identical latent bug (introduced in ci: Extract docs versioning and release into reusable workflows #728 but not yet exercised by a stable release).

The post-publish doc release job invokes manual_release_docs.yaml with a commit SHA, so actions/checkout leaves the repo in detached HEAD and the hand-rolled git push fails. Switch to EndBug/add-and-commit with new_branch set to the default branch, and apply the same fix to manual_version_docs.yaml where the same latent bug existed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vdusek vdusek added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Apr 18, 2026
@vdusek vdusek self-assigned this Apr 18, 2026
@vdusek vdusek requested a review from Pijukatel April 18, 2026 07:39
@github-actions github-actions bot added this to the 138th sprint - Tooling team milestone Apr 18, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.25%. Comparing base (76e4de4) to head (27a3a80).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #741      +/-   ##
==========================================
- Coverage   95.38%   95.25%   -0.14%     
==========================================
  Files          45       45              
  Lines        5118     5118              
==========================================
- Hits         4882     4875       -7     
- Misses        236      243       +7     
Flag Coverage Δ
integration 95.25% <ø> (-0.14%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants