From f3c598afbcaefceab5ada281c00319a1704bd6ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Far=C3=ADas=20Santana?= Date: Mon, 16 Oct 2023 11:28:41 +0200 Subject: [PATCH] feat(temporal-worker): Add steps to trigger deployment (#17881) --- .github/workflows/container-images-cd.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/container-images-cd.yml b/.github/workflows/container-images-cd.yml index 6b15b95ef6898..5345308504bb3 100644 --- a/.github/workflows/container-images-cd.yml +++ b/.github/workflows/container-images-cd.yml @@ -122,3 +122,21 @@ jobs: { "image_tag": "${{ steps.build.outputs.digest }}" } + + - name: Check for changes that affect temporal worker + id: check_changes_temporal_worker + run: | + echo "::set-output name=changed::$(git diff --name-only HEAD^ HEAD | grep -E '^posthog/temporal/|^posthog/batch_exports/|^posthog/management/commands/start_temporal_worker.py$' || true)" + + - name: Trigger Temporal Worker Cloud deployment + if: steps.check_changes_temporal_worker.outputs.changed != '' + uses: mvasigh/dispatch-action@main + with: + token: ${{ steps.deployer.outputs.token }} + repo: charts + owner: PostHog + event_type: temporal_worker_deploy + message: | + { + "image_tag": "${{ steps.build.outputs.digest }}" + }