Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Commit

Permalink
Add output variable for pull request URL. Fixes #8. (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesnetherton authored Apr 8, 2020
1 parent f0b9cd6 commit e2b6759
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ inputs:
github_token:
description: GitHub token secret
required: true
outputs:
pr_url:
description: 'Pull request URL'
runs:
using: 'docker'
image: 'Dockerfile'
Expand Down
9 changes: 8 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,11 @@ COMMAND="hub pull-request \
|| true"

echo "$COMMAND"
sh -c "$COMMAND"

PR_URL=$(sh -c "$COMMAND")
if [[ "$?" != "0" ]]; then
exit 1
fi

echo ${PR_URL}
echo "::set-output name=pr_url::${PR_URL}"

0 comments on commit e2b6759

Please sign in to comment.