From ba6e316bc3875a564606762df500e8bbce60d6e3 Mon Sep 17 00:00:00 2001 From: chrispsheehan Date: Fri, 12 Jan 2024 16:56:43 +0000 Subject: [PATCH] url in outputs --- .github/workflows/deploy-dev.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index fc9d8c5..b9c371b 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -54,12 +54,14 @@ jobs: - id: set-zip-path run: echo "APP_ZIP_PATH=$(echo ${{ env.app_zip_path }})" >> $GITHUB_OUTPUT - dev: + deploy: runs-on: ubuntu-latest needs: build permissions: id-token: write contents: read + outputs: + api_gateway_url: ${{ steps.action.outputs.API_GATEWAY_URL }} steps: - uses: actions/checkout@v4 with: @@ -99,10 +101,11 @@ jobs: run: | cd tf terraform apply -auto-approve -var function-stage=dev -var lambda-zip-path=${{ needs.build.outputs.app_zip_path }} + echo "API_GATEWAY_URL=$(terraform output -raw api_gateway_url)" >> $GITHUB_OUTPUT - # get-url: - # needs: dev - # runs-on: ubuntu-latest - # steps: - # - run: echo random-number ${{ steps.action.outputs.api-url }} - # shell: bash + test: + needs: deploy + runs-on: ubuntu-latest + steps: + - run: echo url is ${{ needs.deploy.outputs.api_gateway_url }} + shell: bash