Skip to content

Commit 8a04237

Browse files
Merge pull request #26014 from ashley-cui/machospr
Fix mach os pr release action
2 parents 79a820a + 2b06c01 commit 8a04237

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

.github/workflows/machine-os-pr.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@ name: "Machine OS PR"
22

33
on:
44
pull_request_target:
5-
# prevent action from running on older release-process branches
6-
# TODO: remove when we move to new release flow
7-
branches:
8-
- 'v5.5'
9-
- 'main'
105
paths:
116
- 'version/rawversion/version.go'
127

@@ -34,8 +29,10 @@ jobs:
3429
run: |
3530
VERSION=$(curl "https://raw.githubusercontent.com/$PODMAN_REPO/$SHA/version/rawversion/version.go" | sed -n 's/^const RawVersion = \"\(.*\)\"$/\1/p')
3631
# ignore -dev version bumps unless on main
37-
if [[ ${{github.base_ref}} != "main" ]] && [[ $VERSION == *-dev ]] ; then
38-
echo "::warning:: SKIPPING: dev bump not on main"
32+
if [[ $VERSION == *-dev ]] ; then
33+
echo "::warning:: SKIPPING: dev bump"
34+
elif [[ ${{github.base_ref}} == "main" ]] ; then
35+
echo "::warning:: SKIPPING: main branch"
3936
elif [[ ${{github.base_ref}} == *-rhel ]] ; then
4037
echo "::warning:: SKIPPING: rhel branch"
4138
else
@@ -128,9 +125,11 @@ jobs:
128125
id: pr
129126
run: |
130127
bumpbranch="pr${{github.event.number}}"
128+
body=$(printf 'Triggered by https://github.com/%s/pull/%s\n\n```release-note\nRelease v%s\n```\n' \
129+
"$PODMAN_REPO" "${{github.event.number}}" "${{ steps.getversion.outputs.version }}")
131130
uri=`gh pr create \
132131
--title "Bump Podman to v${{ steps.getversion.outputs.version }}" \
133-
--body "Triggered by https://github.com/$PODMAN_REPO/pull/${{github.event.number}}" \
132+
--body "$body" \
134133
--head "podmanbot:$bumpbranch" \
135134
--base "${{github.base_ref}}" \
136135
--repo $UPSTREAM_MACHINE_OS`

0 commit comments

Comments
 (0)