From 0370deeb4c009c579caec49475acada4fec76557 Mon Sep 17 00:00:00 2001 From: Jay Whitwell <72501756+jay-whitwell@users.noreply.github.com> Date: Thu, 12 Dec 2024 16:06:37 +0000 Subject: [PATCH] UML-3762: ensure end of workflow runs (#2998) * UML-3762: ensure end of workflow runs * update name --------- Co-authored-by: Nick Davis <62664046+nickdavis2001@users.noreply.github.com> --- .github/workflows/path-to-live.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/path-to-live.yml b/.github/workflows/path-to-live.yml index 3fefb02532..dc7fe4a428 100644 --- a/.github/workflows/path-to-live.yml +++ b/.github/workflows/path-to-live.yml @@ -282,13 +282,18 @@ jobs: name: end of workflow runs-on: ubuntu-latest needs: - - code_coverage - - slack_notify - - production_health_check - workflow_variables + - slack_notify steps: - - name: workflow has ended without issue + - name: workflow has ended run: | - echo "Deployment to production successful" - echo "Tag Used: main-${{ needs.workflow_variables.outputs.semver_tag }}" - echo "URL: https://use-lasting-power-of-attorney.service.gov.uk" + if ${{ contains(needs.slack_notify.result, 'success') }}; then + echo "Deployment to production successful" + echo "Tag Used: main-${{ needs.workflow_variables.outputs.semver_tag }}" + echo "URL: https://use-lasting-power-of-attorney.service.gov.uk + exit 0 + else + echo "Deployment to production failed" + exit 1 + fi + if: always()