diff --git a/.github/workflows/deploy-dev.yml b/.github/workflows/deploy-dev.yml index ca3ff7ec..7f4ba647 100644 --- a/.github/workflows/deploy-dev.yml +++ b/.github/workflows/deploy-dev.yml @@ -29,7 +29,9 @@ on: jobs: deploy: name: Deploy - environment: ${{ inputs.environment }} + environment: + name: ${{ inputs.environment }} + url: ${{ env.DEPLOYMENT_URL }} runs-on: ubuntu-latest permissions: id-token: write # This is required for requesting the JWT @@ -71,6 +73,7 @@ jobs: run: | export CLEANED_BRANCH_NAME=$(echo ${BRANCH_NAME} | sed 's/^feature[-/]//' | sed 's:^\w*\/::' | tr -s ' _/[]().' '-' | tr '[:upper:]' '[:lower:]' | cut -c1-28 | sed 's/-$//') export HOST_NAME=${CLEANED_BRANCH_NAME}-${DEV_HOST} + echo "DEPLOYMENT_URL=https://${HOST_NAME}" >> $GITHUB_ENV helm upgrade ${CLEANED_BRANCH_NAME} \ ${HELM_DIR} \ diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fbb8fa42..37c36036 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,6 +11,9 @@ on: ECR_REPOSITORY: required: true type: string + DEPLOYMENT_URL: + required: false + type: string secrets: ECR_REGISTRY: required: true @@ -29,7 +32,9 @@ on: jobs: deploy: name: Deploy - environment: ${{ inputs.environment }} + environment: + name: ${{ inputs.environment }} + url: ${{ vars.DEPLOYMENT_URL }} runs-on: ubuntu-latest permissions: id-token: write # This is required for requesting the JWT diff --git a/.github/workflows/feature-branch.yml b/.github/workflows/feature-branch.yml index 4c18bdad..1bd4c007 100644 --- a/.github/workflows/feature-branch.yml +++ b/.github/workflows/feature-branch.yml @@ -66,6 +66,7 @@ jobs: environment: uat ECR_REGION: ${{vars.ECR_REGION}} ECR_REPOSITORY: ${{vars.ECR_REPOSITORY}} + DEPLOYMENT_URL: ${{vars.DEPLOYMENT_URL}} secrets: ECR_REGISTRY: ${{ secrets.ECR_REGISTRY }} ECR_ROLE_TO_ASSUME: ${{ secrets.ECR_ROLE_TO_ASSUME }} diff --git a/.github/workflows/main-branch.yml b/.github/workflows/main-branch.yml index bbc9bf67..54ca05cc 100644 --- a/.github/workflows/main-branch.yml +++ b/.github/workflows/main-branch.yml @@ -63,6 +63,7 @@ jobs: environment: production ECR_REGION: ${{vars.ECR_REGION}} ECR_REPOSITORY: ${{vars.ECR_REPOSITORY}} + DEPLOYMENT_URL: ${{vars.DEPLOYMENT_URL}} secrets: ECR_REGISTRY: ${{ secrets.ECR_REGISTRY }} ECR_ROLE_TO_ASSUME: ${{ secrets.ECR_ROLE_TO_ASSUME }}