Commit 16bf07d
ci: Fix docs release failing on detached HEAD (#866)
## 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.
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 87da1c2 commit 16bf07d
3 files changed
Lines changed: 17 additions & 44 deletions
File tree
- .github/workflows
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | 6 | | |
13 | 7 | | |
14 | 8 | | |
15 | 9 | | |
16 | 10 | | |
17 | | - | |
| 11 | + | |
18 | 12 | | |
19 | 13 | | |
20 | 14 | | |
| |||
37 | 31 | | |
38 | 32 | | |
39 | 33 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | 34 | | |
50 | 35 | | |
51 | 36 | | |
52 | 37 | | |
53 | | - | |
| 38 | + | |
54 | 39 | | |
55 | 40 | | |
56 | 41 | | |
| |||
74 | 59 | | |
75 | 60 | | |
76 | 61 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
84 | 69 | | |
85 | 70 | | |
86 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| |||
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
124 | | - | |
| 125 | + | |
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | 6 | | |
13 | 7 | | |
14 | 8 | | |
15 | 9 | | |
16 | 10 | | |
17 | | - | |
| 11 | + | |
18 | 12 | | |
19 | 13 | | |
20 | 14 | | |
21 | 15 | | |
22 | | - | |
| 16 | + | |
23 | 17 | | |
24 | 18 | | |
25 | 19 | | |
| |||
43 | 37 | | |
44 | 38 | | |
45 | 39 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | 40 | | |
56 | 41 | | |
57 | 42 | | |
58 | 43 | | |
59 | | - | |
| 44 | + | |
60 | 45 | | |
61 | 46 | | |
62 | 47 | | |
| |||
123 | 108 | | |
124 | 109 | | |
125 | 110 | | |
| 111 | + | |
| 112 | + | |
126 | 113 | | |
127 | 114 | | |
128 | 115 | | |
| |||
0 commit comments