File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -578,13 +578,18 @@ jobs:
578578 deploy :
579579 needs : [install-deps]
580580 runs-on : ubuntu-latest
581- environment : ghpublic
581+ environment :
582+ name : ghpublic
583+ url : https://lambdadispatch${{ steps.getDeployUrl.outputs.stack-url-suffix }}.ghpublic.pwrdrvr.com/ping
582584 permissions :
583585 id-token : write
584586 contents : read
585587 concurrency :
586588 group : deploy-${{ github.workflow }}-${{ github.event.pull_request.number }}
587589 cancel-in-progress : false
590+ outputs :
591+ stack-url-suffix : ${{ steps.getDeployUrl.outputs.stack-url-suffix }}
592+ url : https://lambdadispatch${{ steps.getDeployUrl.outputs.stack-url-suffix }}.ghpublic.pwrdrvr.com
588593 if : ${{ always() && needs.install-deps.result != 'failed' }}
589594 env :
590595 DEMO_APP_REGISTRY_IMAGE : public.ecr.aws/pwrdrvr/lambda-dispatch-demo-app${{ github.event_name == 'pull_request' && '-dev' || '' }}
@@ -607,6 +612,15 @@ jobs:
607612 run : |
608613 yarn build
609614
615+ - name : Get Deploy URL
616+ id : getDeployUrl
617+ run : |
618+ if [ "${{ github.event_name }}" == "pull_request" ]; then
619+ echo stack-url-suffix="-pr-${{ github.event.pull_request.number }}" >> $GITHUB_OUTPUT
620+ else
621+ echo stack-url-suffix="" >> $GITHUB_OUTPUT
622+ fi
623+
610624 - name : Deploy Stack
611625 env :
612626 PR_NUMBER : ${{ github.event.pull_request.number }}
@@ -628,7 +642,7 @@ jobs:
628642 STACK_SUFFIX=""
629643 fi
630644
631- BASE_URL="https://lambdadispatch${STACK_SUFFIX}.ghpublic.pwrdrvr.com "
645+ BASE_URL="${{ needs.deploy.outputs.url }} "
632646 echo "Smoke testing ${BASE_URL}"
633647
634648 for i in {1..5}; do
You can’t perform that action at this time.
0 commit comments