diff --git a/.github/actions/cloud-platform-deploy/action.yml b/.github/actions/cloud-platform-deploy/action.yml index 6dc30f2..5e04e29 100644 --- a/.github/actions/cloud-platform-deploy/action.yml +++ b/.github/actions/cloud-platform-deploy/action.yml @@ -61,6 +61,9 @@ outputs: deployment_changelog: description: "The changelog for the deployment" value: ${{ steps.version_history.outputs.deployment_changelog }} + deployment_ingress_url: + description: "Ingress URL for the deployment" + value: ${{ steps.get_deployment_ingress_url.outputs.deployment_ingress_url }} runs: using: composite @@ -154,4 +157,11 @@ runs: ${{ inputs.helm_additional_args }} \ ${{ steps.check-ip-allowlists.outputs.ALLOWLIST_GROUPS }} \ ${{ steps.check-ip-allowlists-version.outputs.ALLOWLIST_VERSION }} \ - --wait \ No newline at end of file + --wait + + - name: Extract deployment ingress URL + id: get_deployment_ingress_url + shell: bash + run: | + ingress_host=$(yq '.generic-service.ingress.host' "helm_deploy/values-${{ steps.env.outputs.environment }}.yaml") + echo "deployment_ingress_url=https://${ingress_host}" >> $GITHUB_OUTPUT \ No newline at end of file diff --git a/.github/workflows/deploy_env.yml b/.github/workflows/deploy_env.yml index 53c72a2..d3bedd2 100644 --- a/.github/workflows/deploy_env.yml +++ b/.github/workflows/deploy_env.yml @@ -62,6 +62,8 @@ jobs: strategy: fail-fast: false environment: ${{ inputs.environment }} + outputs: + deployment_ingress_url: ${{ steps.deploy.outputs.deployment_ingress_url }} steps: - uses: actions/checkout@v4 with: @@ -90,4 +92,19 @@ jobs: helm_dir: ${{ inputs.helm_dir }} helm_allowlist_groups: ${{ vars.HMPPS_IP_ALLOWLIST_GROUPS_YAML }} helm_allowlist_version: ${{ vars.HMPPS_IP_ALLOWLIST_GROUPS_VERSION }} - release_name: ${{ inputs.release_name }} \ No newline at end of file + release_name: ${{ inputs.release_name }} + + deployment_status: + name: Update Deployment Status + runs-on: ubuntu-latest + needs: [deploy_env] + steps: + - name: Update Deployment Status + uses: octokit/request-action@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + route: POST /repos/${{ github.repository }}/deployments/${{ github.run_id }}/statuses + state: success + environment_url: ${{ needs.deploy_env.outputs.deployment_ingress_url }} + description: "Deployment completed successfully!" \ No newline at end of file