Skip to content

Commit a83b550

Browse files
committed
ci: qualify release source checkouts as tag refs
Prevent same-named branches from shadowing release tags when resolving configuration, notes, docs, and source archives. Preserve branch and default-ref behavior for ordinary docs builds. Validated with the pinned checkout implementation and real same-name branch/tag collisions; six cases and actionlint passed.
1 parent 71d782a commit a83b550

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎.github/workflows/build-docs.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
6868
with:
6969
fetch-depth: 1
70-
ref: ${{ inputs.git-tag }}
70+
ref: ${{ inputs.is-release && format('refs/tags/{0}', inputs.git-tag) || inputs.git-tag }}
7171

7272
- name: Checkout docs control plane
7373
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
@@ -433,7 +433,7 @@ jobs:
433433
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
434434
with:
435435
fetch-depth: 1
436-
ref: ${{ inputs.git-tag }}
436+
ref: ${{ inputs.is-release && format('refs/tags/{0}', inputs.git-tag) || inputs.git-tag }}
437437

438438
- name: Download docs deployment payload
439439
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1

‎.github/workflows/release-cuda-pathfinder.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ jobs:
192192
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
193193
with:
194194
fetch-depth: 1
195-
ref: ${{ needs.prepare.outputs.tag }}
195+
ref: refs/tags/${{ needs.prepare.outputs.tag }}
196196

197197
- name: Create source archive
198198
run: |
@@ -202,7 +202,7 @@ jobs:
202202
--format=tar.gz \
203203
--prefix="${archive}/" \
204204
--output="release/${archive}.tar.gz" \
205-
"${TAG}"
205+
"refs/tags/${TAG}"
206206
sha256sum "release/${archive}.tar.gz" \
207207
| awk '{print $1}' > "release/${archive}.tar.gz.sha256sum"
208208

‎.github/workflows/release-upload.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
- name: Checkout release source
6161
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
6262
with:
63-
ref: ${{ inputs.git-tag }}
63+
ref: refs/tags/${{ inputs.git-tag }}
6464
path: release-source
6565

6666
- name: Set up Python

‎.github/workflows/release.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
- name: Checkout release source
6767
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
6868
with:
69-
ref: ${{ inputs.git-tag }}
69+
ref: refs/tags/${{ inputs.git-tag }}
7070
path: release-source
7171

7272
- name: Set up Python
@@ -193,7 +193,7 @@ jobs:
193193
- name: Checkout release source
194194
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
195195
with:
196-
ref: ${{ inputs.git-tag }}
196+
ref: refs/tags/${{ inputs.git-tag }}
197197
path: release-source
198198

199199
- name: Set up Python
@@ -281,7 +281,7 @@ jobs:
281281
- name: Checkout release source
282282
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
283283
with:
284-
ref: ${{ inputs.git-tag }}
284+
ref: refs/tags/${{ inputs.git-tag }}
285285
path: release-source
286286

287287
- name: Set up Python
@@ -347,7 +347,7 @@ jobs:
347347
- name: Checkout release source
348348
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
349349
with:
350-
ref: ${{ inputs.git-tag }}
350+
ref: refs/tags/${{ inputs.git-tag }}
351351
path: release-source
352352

353353
- name: Set up Python

0 commit comments

Comments
 (0)