Skip to content

Commit ef8559b

Browse files
desrosjclaude
andcommitted
Build/Test Tools: Fix the combined Gutenberg checkout and restrict the branch input.
- Run the single Gutenberg checkout for both trunk and version branches, after the release details are retrieved (so the trunk ref resolves to the release tag), and target wp/X.Y for version branches. - Make the branch input a choice so only allowed values can be dispatched. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 7355b7d commit ef8559b

1 file changed

Lines changed: 10 additions & 17 deletions

File tree

‎.github/workflows/gutenberg-sync.yml‎

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,14 @@ on:
2424
workflow_dispatch:
2525
inputs:
2626
branch:
27-
description: 'Branch to update: "trunk" or an X.Y branch name (e.g. "6.8").'
27+
description: 'Branch to update.'
2828
required: true
29-
type: string
30-
default: 'trunk'
29+
type: choice
30+
# Update this list as Gutenberg cuts new wp/X.Y branches.
31+
options:
32+
- trunk
33+
- '7.0'
34+
default: trunk
3135

3236
# Disable permissions for all available scopes by default.
3337
# Any needed permissions are configured at the job level.
@@ -100,23 +104,12 @@ jobs:
100104
echo "PR_TITLE=Bump \`gutenberg.sha\` to version ${TAG}"
101105
} >> "$GITHUB_ENV"
102106
103-
- name: Checkout Gutenberg at the release (trunk only)
104-
if: ${{ inputs.branch == 'trunk' }}
105-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
106-
with:
107-
repository: WordPress/gutenberg
108-
ref: ${{ env.TAG }}
109-
path: gutenberg-src
110-
fetch-depth: 0
111-
persist-credentials: false
112-
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
113-
114-
- name: Checkout the target branch in Gutenberg (version branches)
115-
if: ${{ inputs.branch != 'trunk' }}
107+
- name: Checkout the Gutenberg repository
116108
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
117109
with:
118110
repository: WordPress/gutenberg
119-
ref: wp/${{ env.BASE_BRANCH }}
111+
# Trunk targets the release tag; version branches target wp/X.Y.
112+
ref: ${{ inputs.branch == 'trunk' && env.TAG || format('wp/{0}', env.BASE_BRANCH) }}
120113
path: gutenberg-src
121114
fetch-depth: 0
122115
persist-credentials: false

0 commit comments

Comments
 (0)