Skip to content

Commit 6a414fc

Browse files
vdusekclaude
andcommitted
ci: Drop ref input from docs workflow_dispatch
Manual dispatches always use the default branch, since these workflows push commits back to it and an off-master ref would non-fast-forward. The ref input stays on workflow_call for pinning release commits. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 27a3a80 commit 6a414fc

2 files changed

Lines changed: 20 additions & 20 deletions

File tree

.github/workflows/manual_release_docs.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
name: Release docs
22

33
on:
4-
# Runs when manually triggered from the GitHub UI.
4+
# Runs when manually triggered from the GitHub UI. Always checks out the default branch —
5+
# this workflow pushes a theme-update commit back to the default branch, so the checked-out
6+
# ref must be its current tip to avoid non-fast-forward pushes.
57
workflow_dispatch:
6-
inputs:
7-
ref:
8-
description: Git ref to checkout (branch, tag, or SHA). Defaults to the default branch.
9-
required: false
10-
type: string
11-
default: ""
128

13-
# Runs when invoked by another workflow.
9+
# Runs when invoked by another workflow. The caller is responsible for passing a ref that's
10+
# on the default branch tip (e.g. a freshly pushed commit protected by `concurrency: release`).
1411
workflow_call:
1512
inputs:
1613
ref:
17-
description: Git ref to checkout (branch, tag, or SHA)
14+
description: Git ref to checkout (must resolve to the default branch tip).
1815
required: true
1916
type: string
2017

@@ -76,7 +73,10 @@ jobs:
7673
add: website/package.json website/yarn.lock
7774
message: "chore: Automatic docs theme update [skip ci]"
7875
default_author: github_actions
79-
# Required: checkout may leave a detached HEAD when invoked with a SHA ref.
76+
# Required: `actions/checkout` leaves a detached HEAD when invoked with a SHA ref.
77+
# Creating a local default-branch pointer at HEAD lets EndBug push it back. The caller
78+
# contract (see trigger definitions above) guarantees HEAD is the default branch tip,
79+
# so this push is always a fast-forward.
8080
new_branch: ${{ github.event.repository.default_branch }}
8181

8282
- name: Build docs

.github/workflows/manual_version_docs.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
name: Version docs
22

33
on:
4-
# Runs when manually triggered from the GitHub UI.
4+
# Runs when manually triggered from the GitHub UI. Always checks out the default branch —
5+
# this workflow pushes the version snapshot commit back to the default branch, so the
6+
# checked-out ref must be its current tip to avoid non-fast-forward pushes.
57
workflow_dispatch:
6-
inputs:
7-
ref:
8-
description: Git ref to checkout (branch, tag, or SHA). Defaults to the default branch.
9-
required: false
10-
type: string
11-
default: ""
128

13-
# Runs when invoked by another workflow.
9+
# Runs when invoked by another workflow. The caller is responsible for passing a ref that's
10+
# on the default branch tip (e.g. a freshly pushed commit protected by `concurrency: release`).
1411
workflow_call:
1512
inputs:
1613
ref:
17-
description: Git ref to checkout (branch, tag, or SHA)
14+
description: Git ref to checkout (must resolve to the default branch tip).
1815
required: true
1916
type: string
2017
outputs:
@@ -123,7 +120,10 @@ jobs:
123120
add: website/versioned_docs website/versioned_sidebars website/versions.json
124121
message: "docs: Version docs for v${{ steps.snapshot.outputs.version }} [skip ci]"
125122
default_author: github_actions
126-
# Required: checkout may leave a detached HEAD when invoked with a SHA ref.
123+
# Required: `actions/checkout` leaves a detached HEAD when invoked with a SHA ref.
124+
# Creating a local default-branch pointer at HEAD lets EndBug push it back. The caller
125+
# contract (see trigger definitions above) guarantees HEAD is the default branch tip,
126+
# so this push is always a fast-forward.
127127
new_branch: ${{ github.event.repository.default_branch }}
128128

129129
- name: Resolve output commitish

0 commit comments

Comments
 (0)