Skip to content

Commit 317c65e

Browse files
committed
Fix preview release workflow routing
Run v* branch pushes as rolling preview builds on their branch, keep stable v* tag releases main-owned through the dispatcher, and update release notes so Docker rows use pull commands plus a single package browse link.
1 parent 35c10e5 commit 317c65e

3 files changed

Lines changed: 172 additions & 65 deletions

File tree

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: Dispatch Release
1+
name: Dispatch Stable Release
2+
3+
run-name: Dispatch release ${{ github.ref_name }}
24

35
on:
46
push:
5-
branches:
6-
- "v*"
77
tags:
88
- "v*"
99

@@ -28,41 +28,31 @@ jobs:
2828
set -euo pipefail
2929
3030
source_ref="${GITHUB_REF_NAME}"
31-
source_sha="${GITHUB_SHA}"
32-
publish_release="false"
33-
tag_name=""
31+
tag_name="${GITHUB_REF_NAME}"
3432
35-
if [[ "${GITHUB_REF}" == refs/tags/v* ]]; then
36-
tag_name="${GITHUB_REF_NAME}"
37-
source_sha="$(git rev-list -n 1 "${tag_name}")"
38-
publish_release="true"
39-
elif [[ "${GITHUB_REF}" == refs/heads/v* ]]; then
40-
ref_name_safe="$(printf '%s' "${GITHUB_REF_NAME}" | tr '[:upper:]' '[:lower:]' | sed -E 's#[^a-z0-9_.-]+#-#g; s#^[.-]+##; s#[.-]+$##')"
41-
tag_name="${ref_name_safe}-${source_sha::12}"
42-
else
43-
echo "Unsupported ref ${GITHUB_REF}" >&2
33+
if [[ "${GITHUB_REF}" != refs/tags/v* ]]; then
34+
echo "Unsupported ref ${GITHUB_REF}; stable release dispatch requires a v* tag." >&2
4435
exit 1
4536
fi
37+
source_sha="$(git rev-list -n 1 "${tag_name}")"
4638
4739
{
4840
echo "source_ref=${source_ref}"
4941
echo "source_sha=${source_sha}"
5042
echo "tag_name=${tag_name}"
51-
echo "publish_release=${publish_release}"
5243
} >> "${GITHUB_OUTPUT}"
5344
54-
- name: Dispatch release workflow on main
45+
- name: Dispatch main-owned release workflow
5546
env:
5647
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5748
SOURCE_REF: ${{ steps.meta.outputs.source_ref }}
5849
SOURCE_SHA: ${{ steps.meta.outputs.source_sha }}
5950
TAG_NAME: ${{ steps.meta.outputs.tag_name }}
60-
PUBLISH_RELEASE: ${{ steps.meta.outputs.publish_release }}
6151
run: |
6252
set -euo pipefail
6353
gh workflow run release.yml \
6454
--ref main \
6555
--field source_ref="${SOURCE_REF}" \
6656
--field source_sha="${SOURCE_SHA}" \
6757
--field tag_name="${TAG_NAME}" \
68-
--field publish_release="${PUBLISH_RELEASE}"
58+
--field publish_release="true"

0 commit comments

Comments
 (0)