Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/promote-next-to-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,15 @@ jobs:
- name: Upsert promotion PR
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
PROMOTION_PR_TITLE: ${{ steps.meta.outputs.title }}
PROMOTION_PR_BODY: ${{ steps.meta.outputs.body }}
shell: bash
run: |
set -euo pipefail

body_file=$(mktemp)
printf '%s\n' "$PROMOTION_PR_BODY" > "$body_file"

existing=$(gh pr list \
--state open \
--base main \
Expand All @@ -127,14 +132,14 @@ jobs:

if [ -n "$existing" ]; then
gh pr edit "$existing" \
--title "${{ steps.meta.outputs.title }}" \
--body "${{ steps.meta.outputs.body }}"
--title "$PROMOTION_PR_TITLE" \
--body-file "$body_file"
echo "Updated PR #$existing"
else
gh pr create \
--base main \
--head next \
--title "${{ steps.meta.outputs.title }}" \
--body "${{ steps.meta.outputs.body }}"
--title "$PROMOTION_PR_TITLE" \
--body-file "$body_file"
echo "Created promotion PR"
fi
Loading