Skip to content

Commit

Permalink
chore(ci/cd): Add the necessary conditions to the deploy job inside d…
Browse files Browse the repository at this point in the history
…eploy.yml workflow so it works as expected
  • Loading branch information
alepefe committed Dec 10, 2024
1 parent 8f87a77 commit 5086683
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5086683

Please sign in to comment.