Skip to content

Commit d8dc4f0

Browse files
authored
Fix preview URL precedence (#29)
1 parent 80d4bf5 commit d8dc4f0

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

action.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ runs:
8383
tail -n1
8484
)" >> $GITHUB_ENV
8585
shell: bash
86-
86+
8787
- name: Install tools
8888
uses: jenseng/dynamic-uses@v1
8989
if: ${{ inputs.skip-startup == 'true' || inputs.state-backend == 'ephemeral' || inputs.state-action == 'save' }}
@@ -139,8 +139,6 @@ runs:
139139
- name: Display Ephemeral Instance URL
140140
if: ${{ inputs.state-action == 'start' && inputs.state-backend == 'ephemeral' && (inputs.include-preview == 'true' || inputs.ci-project != '') }}
141141
uses: jenseng/dynamic-uses@v1
142-
env:
143-
default-include-preview: ${{ fromJSON('["false","true"]')[github.event_name == 'pull_request'] }}
144142
with:
145143
uses: ${{ env.GH_ACTION_ROOT }}/finish
146144
with: |-

finish/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ runs:
3232
shell: bash
3333
if: inputs.include-preview
3434
run: |
35-
if [[ -n "${{ inputs.preview-url }}" ]]; then
36-
echo "LS_PREVIEW_URL=${{ inputs.preview-url }}" >> $GITHUB_ENV
35+
if [[ -n "${LS_PREVIEW_URL:-${{ inputs.preview-url }}}" ]]; then
36+
echo "LS_PREVIEW_URL=${LS_PREVIEW_URL:-${{ inputs.preview-url }}}" >> $GITHUB_ENV
3737
elif [[ -e ls-preview-url.txt ]]; then
3838
echo "LS_PREVIEW_URL=$(<ls-preview-url.txt)" >> $GITHUB_ENV
3939
else

tools/action.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ runs:
1616
if [ "$INSTALL_AWSLOCAL" = true ]; then
1717
which awslocal > /dev/null || pip install awscli-local[ver1]
1818
fi
19-
2019
shell: bash
2120
env:
2221
INSTALL_AWSLOCAL: "${{ inputs.install-awslocal }}"

0 commit comments

Comments
 (0)