From 3bfd752729292c623114c31d06c36e3b392a9333 Mon Sep 17 00:00:00 2001 From: Brett Hoerner Date: Tue, 16 Jan 2024 08:16:35 -0700 Subject: [PATCH] fix(ci): Fix CI changes checks (#19783) --- .github/workflows/container-images-cd.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/container-images-cd.yml b/.github/workflows/container-images-cd.yml index 9f9c05dfcbbda..ad78157702546 100644 --- a/.github/workflows/container-images-cd.yml +++ b/.github/workflows/container-images-cd.yml @@ -98,10 +98,10 @@ jobs: - name: Check for changes in plugins directory id: check_changes_plugins run: | - echo "changed=$(git diff --name-only HEAD^ HEAD | grep '^plugin-server/' || true)" >> $GITHUB_OUTPUT + echo "changed=$((git diff --name-only HEAD^ HEAD | grep -q '^plugin-server/' && echo true) || echo false)" >> $GITHUB_OUTPUT - name: Trigger Ingestion Cloud deployment - if: steps.check_changes_plugins.outputs.changed != '' + if: steps.check_changes_plugins.outputs.changed == 'true' uses: mvasigh/dispatch-action@main with: token: ${{ steps.deployer.outputs.token }} @@ -116,10 +116,10 @@ jobs: - name: Check for changes that affect batch exports temporal worker id: check_changes_batch_exports_temporal_worker run: | - echo "changed=$(git diff --name-only HEAD^ HEAD | grep -E '^posthog/temporal/common|^posthog/temporal/batch_exports|^posthog/batch_exports/|^posthog/management/commands/start_temporal_worker.py$' || true)" >> $GITHUB_OUTPUT + echo "changed=$((git diff --name-only HEAD^ HEAD | grep -qE '^posthog/temporal/common|^posthog/temporal/batch_exports|^posthog/batch_exports/|^posthog/management/commands/start_temporal_worker.py$' && echo true) || echo false)" >> $GITHUB_OUTPUT - name: Trigger Batch Exports Temporal Worker Cloud deployment - if: steps.check_changes_batch_exports_temporal_worker.outputs.changed != '' + if: steps.check_changes_batch_exports_temporal_worker.outputs.changed == 'true' uses: mvasigh/dispatch-action@main with: token: ${{ steps.deployer.outputs.token }} @@ -135,10 +135,10 @@ jobs: - name: Check for changes that affect data warehouse temporal worker id: check_changes_data_warehouse_temporal_worker run: | - echo "changed=$(git diff --name-only HEAD^ HEAD | grep -E '^posthog/temporal/common|^posthog/temporal/data_imports|^posthog/warehouse/|^posthog/management/commands/start_temporal_worker.py$' || true)" >> $GITHUB_OUTPUT + echo "changed=$((git diff --name-only HEAD^ HEAD | grep -qE '^posthog/temporal/common|^posthog/temporal/data_imports|^posthog/warehouse/|^posthog/management/commands/start_temporal_worker.py$' && echo true) || echo false)" >> $GITHUB_OUTPUT - name: Trigger Data Warehouse Temporal Worker Cloud deployment - if: steps.check_changes_data_warehouse_temporal_worker.outputs.changed != '' + if: steps.check_changes_data_warehouse_temporal_worker.outputs.changed == 'true' uses: mvasigh/dispatch-action@main with: token: ${{ steps.deployer.outputs.token }}