Skip to content

ci: Fix docs release failing on detached HEAD#866

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

ci: Fix docs release failing on detached HEAD#866
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

Same fix as apify/apify-client-python#741 — the SDK workflows have the identical bug.

When manual_release_docs.yaml is invoked with a commit SHA as ref (from doc_release_post_publish in on_master.yaml or from manual_release_stable.yaml), actions/checkout leaves the repo in detached HEAD state and the hand-rolled Commit the updated package.json and lockfile step's git push fails with fatal: You are not currently on a branch.

The same latent bug exists in manual_version_docs.yaml's EndBug/add-and-commit step (no new_branch set). Neither has fired yet because no feat/fix/perf/refactor/style commit has landed on master since the reusable-workflow extraction merged.

Fix

  • Replace the hand-rolled git block in manual_release_docs.yaml with EndBug/add-and-commit@v10.
  • Set new_branch: ${{ github.event.repository.default_branch }} in both workflows — EndBug does not handle detached HEAD by itself (its default push is git push origin --set-upstream with no refspec, which fails the same way). Setting new_branch makes it create/checkout a local default branch at current HEAD before committing.

When manual_release_docs.yaml is invoked with a commit SHA as ref (e.g. from doc_release_post_publish in on_master.yaml or from the stable release pipeline), actions/checkout leaves the repo in a detached HEAD state and the hand-rolled git push fails with "fatal: You are not currently on a branch." 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:42
@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 86.64%. Comparing base (87da1c2) to head (6abec8f).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #866   +/-   ##
=======================================
  Coverage   86.64%   86.64%           
=======================================
  Files          48       48           
  Lines        2920     2920           
=======================================
  Hits         2530     2530           
  Misses        390      390           
Flag Coverage Δ
e2e 37.87% <ø> (ø)
integration 59.28% <ø> (ø)
unit 74.69% <ø> (ø)

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