From c997da0ea6089de2e282f4aca1837dca84f9e50c Mon Sep 17 00:00:00 2001 From: Are Almaas Date: Fri, 28 Feb 2025 09:56:18 +0100 Subject: [PATCH] ci: ensure we deploy infra and apps only when necessary --- .github/workflows/ci-cd-prod.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cd-prod.yml b/.github/workflows/ci-cd-prod.yml index eea32b40..438a432e 100644 --- a/.github/workflows/ci-cd-prod.yml +++ b/.github/workflows/ci-cd-prod.yml @@ -85,7 +85,7 @@ jobs: deploy-infrastructure ] # we want deployment of apps to be dependent on a dry-run deployment of apps, but if deploying infrastructure is skipped, we still want to deploy the apps - if: ${{ always() && !failure() && !cancelled() && (github.event_name == 'workflow_dispatch' || needs.check-for-changes.outputs.hasApplicationChanges == 'true') }} + if: ${{ always() && !failure() && !cancelled() && (needs.check-for-changes.outputs.hasApplicationChanges == 'true') }} uses: ./.github/workflows/workflow-deploy-apps.yml secrets: AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} @@ -108,7 +108,7 @@ jobs: store-apps-version: name: Store Latest Deployed Apps Version as GitHub Variable needs: [deploy-apps] - if: ${{ always() && !failure() && (github.event_name == 'workflow_dispatch' || needs.deploy-apps.outputs.deployment_executed == 'true') }} + if: ${{ always() && !failure() && (needs.deploy-apps.outputs.deployment_executed == 'true') }} uses: ./.github/workflows/workflow-store-github-env-variable.yml with: variable_name: LATEST_DEPLOYED_APPS_VERSION