Skip to content

Commit feff80e

Browse files
committed
introduce preview-url to finish action
1 parent 2780efb commit feff80e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

finish/action.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@ inputs:
99
required: false
1010
include-preview:
1111
description: 'Whether to include the created preview URL in the PR comment'
12-
type: boolean
13-
default: false
12+
required: false
13+
preview-url:
14+
description: 'The preview url to include in the PR comment'
15+
required: false
1416

1517
runs:
1618
using: composite
@@ -30,7 +32,9 @@ runs:
3032
shell: bash
3133
if: inputs.include-preview
3234
run: |
33-
if [[ -e ls-preview-url.txt ]]; then
35+
if [[ -z "${{ inputs.preview-url }}" ]]; then
36+
echo "LS_PREVIEW_URL=${{ inputs.preview }}" >> $GITHUB_ENV
37+
elif [[ -e ls-preview-url.txt ]]; then
3438
echo "LS_PREVIEW_URL=$(<ls-preview-url.txt)" >> $GITHUB_ENV
3539
else
3640
echo "LS_PREVIEW_URL=Unable to determine preview URL" >> $GITHUB_ENV

0 commit comments

Comments
 (0)