mirror of
https://github.com/containers/podman.git
synced 2025-10-19 12:12:36 +08:00
Fix mach os pr release action
- Remove branch restrictions - Do not open PR on main - Add release note to PR Signed-off-by: Ashley Cui <acui@redhat.com>
This commit is contained in:
15
.github/workflows/machine-os-pr.yml
vendored
15
.github/workflows/machine-os-pr.yml
vendored
@ -2,11 +2,6 @@ name: "Machine OS PR"
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
# prevent action from running on older release-process branches
|
|
||||||
# TODO: remove when we move to new release flow
|
|
||||||
branches:
|
|
||||||
- 'v5.5'
|
|
||||||
- 'main'
|
|
||||||
paths:
|
paths:
|
||||||
- 'version/rawversion/version.go'
|
- 'version/rawversion/version.go'
|
||||||
|
|
||||||
@ -34,8 +29,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
VERSION=$(curl "https://raw.githubusercontent.com/$PODMAN_REPO/$SHA/version/rawversion/version.go" | sed -n 's/^const RawVersion = \"\(.*\)\"$/\1/p')
|
VERSION=$(curl "https://raw.githubusercontent.com/$PODMAN_REPO/$SHA/version/rawversion/version.go" | sed -n 's/^const RawVersion = \"\(.*\)\"$/\1/p')
|
||||||
# ignore -dev version bumps unless on main
|
# ignore -dev version bumps unless on main
|
||||||
if [[ ${{github.base_ref}} != "main" ]] && [[ $VERSION == *-dev ]] ; then
|
if [[ $VERSION == *-dev ]] ; then
|
||||||
echo "::warning:: SKIPPING: dev bump not on main"
|
echo "::warning:: SKIPPING: dev bump"
|
||||||
|
elif [[ ${{github.base_ref}} == "main" ]] ; then
|
||||||
|
echo "::warning:: SKIPPING: main branch"
|
||||||
elif [[ ${{github.base_ref}} == *-rhel ]] ; then
|
elif [[ ${{github.base_ref}} == *-rhel ]] ; then
|
||||||
echo "::warning:: SKIPPING: rhel branch"
|
echo "::warning:: SKIPPING: rhel branch"
|
||||||
else
|
else
|
||||||
@ -128,9 +125,11 @@ jobs:
|
|||||||
id: pr
|
id: pr
|
||||||
run: |
|
run: |
|
||||||
bumpbranch="pr${{github.event.number}}"
|
bumpbranch="pr${{github.event.number}}"
|
||||||
|
body=$(printf 'Triggered by https://github.com/%s/pull/%s\n\n```release-note\nRelease v%s\n```\n' \
|
||||||
|
"$PODMAN_REPO" "${{github.event.number}}" "${{ steps.getversion.outputs.version }}")
|
||||||
uri=`gh pr create \
|
uri=`gh pr create \
|
||||||
--title "Bump Podman to v${{ steps.getversion.outputs.version }}" \
|
--title "Bump Podman to v${{ steps.getversion.outputs.version }}" \
|
||||||
--body "Triggered by https://github.com/$PODMAN_REPO/pull/${{github.event.number}}" \
|
--body "$body" \
|
||||||
--head "podmanbot:$bumpbranch" \
|
--head "podmanbot:$bumpbranch" \
|
||||||
--base "${{github.base_ref}}" \
|
--base "${{github.base_ref}}" \
|
||||||
--repo $UPSTREAM_MACHINE_OS`
|
--repo $UPSTREAM_MACHINE_OS`
|
||||||
|
Reference in New Issue
Block a user