From 2c4802b4a9db5d6760875e209cc95b6b9c5a3c35 Mon Sep 17 00:00:00 2001 From: Josiah Siegel Date: Mon, 19 Feb 2024 16:12:39 -0500 Subject: [PATCH] update bash output --- action.yml | 2 ++ create-pr.sh | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 573a91a..63a2322 100644 --- a/action.yml +++ b/action.yml @@ -25,10 +25,12 @@ inputs: outputs: PRURL: description: 'The URL of the created pull request' + value: ${{ steps.create_pr.outputs.PR_URL }} runs: using: 'composite' steps: - name: Create Pull Request + id: create_pr shell: bash run: bash create-pr.sh env: diff --git a/create-pr.sh b/create-pr.sh index 2a5ff2a..c6046c0 100644 --- a/create-pr.sh +++ b/create-pr.sh @@ -7,10 +7,10 @@ PR_OUTPUT=$(gh pr create \ --base "$INPUT_TARGETBRANCH" \ --head "$INPUT_SOURCEBRANCH" \ --label "$INPUT_LABELS" \ - --assignee "$INPUT_ASSIGNEES") + --assignee "$INPUT_ASSIGNEES" 2>&1) # Extract PR URL from the output PR_URL=$(echo "$PR_OUTPUT" | grep -o 'https://github.com/[^ ]*') # Set the PR URL as the output -echo "name=$PR_URL" >> $GITHUB_OUTPUT +echo "PR_URL=$PR_URL" >> $GITHUB_OUTPUT