From 50866836f4d0738fb27c8fc865ac23e0639bbb51 Mon Sep 17 00:00:00 2001 From: Alejandro Peralta Date: Wed, 11 Dec 2024 00:28:38 +0100 Subject: [PATCH] chore(ci/cd): Add the necessary conditions to the deploy job inside deploy.yml workflow so it works as expected --- .github/workflows/deploy.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 29bcb37b..800419c1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -222,10 +222,21 @@ jobs: deploy: name: Deploy Services to Amazon EBS needs: [ set_environment_name, build_client, build_api, build_backoffice] + # We need this in order to run the deployment job if none of the builds fails and at least one of them is successful + if: > + ( + needs.build_client.result != 'failure' && + needs.build_api.result != 'failure' && + needs.build_backoffice.result != 'failure' + ) && + ( + (needs.build_client.result == 'success') || + (needs.build_api.result == 'success') || + (needs.build_backoffice == 'success') + ) runs-on: ubuntu-latest environment: name: ${{ needs.set_environment_name.outputs.env_name }} - steps: - name: Checkout code uses: actions/checkout@v3