From 0187e75f6d60a57e6b826c5b9f897f0010aae849 Mon Sep 17 00:00:00 2001 From: kpango Date: Mon, 19 Feb 2024 14:09:28 +0900 Subject: [PATCH] [bugfix] fix backport github value bypass failure Signed-off-by: kpango --- .github/workflows/backport.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index ff6bd63414..b058de9bc2 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -47,11 +47,13 @@ jobs: - name: Get PR title and body id: pr_info run: | - echo "PR_TITLE=$(jq --raw-output .pull_request.title $GITHUB_EVENT_PATH)" >> $GITHUB_ENV - echo "PR_BODY=$(jq --raw-output .pull_request.body $GITHUB_EVENT_PATH)" >> $GITHUB_ENV + echo "PR_NUM=$(jq --raw-output .pull_request.number $GITHUB_EVENT_PATH)" >> $GITHUB_OUTPUT + echo "PR_TITLE=$(jq --raw-output .pull_request.title $GITHUB_EVENT_PATH)" >> $GITHUB_OUTPUT + echo "PR_BODY=$(jq --raw-output .pull_request.body $GITHUB_EVENT_PATH)" >> $GITHUB_OUTPUT - name: Create PR if: ${{ github.event.pull_request.labels.*.name == '${TARGET_LABEL_NAME_PREFIX}*' }} env: + PR_NUM: ${{ steps.pr_info.outputs.PR_NUM }} PR_TITLE: ${{ steps.pr_info.outputs.PR_TITEL }} PR_BODY: ${{ steps.pr_info.outputs.PR_BODY }} GITHUB_USER: ${{ secrets.DISPATCH_USER }} @@ -74,6 +76,6 @@ jobs: git push origin ${BACKPORT_BRANCH_NAME} gh pr create --base ${BRANCH_NAME} \ - --title "Backport to ${BRANCH_NAME} for ${PR_TITLE}" \ + --title "Backport PR #${PR_NUM} to ${BRANCH_NAME} for ${PR_TITLE}" \ --body "${PR_BODY}" done