From 106bf205502a1c298aa5a7c21c308849d1b47864 Mon Sep 17 00:00:00 2001 From: Frank Hamand Date: Fri, 13 Sep 2024 13:59:03 +0100 Subject: [PATCH] deploy other rust services --- .github/workflows/rust-docker-build.yml | 27 ++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/.github/workflows/rust-docker-build.yml b/.github/workflows/rust-docker-build.yml index a677ed818f3a55..7f17d217bb0f08 100644 --- a/.github/workflows/rust-docker-build.yml +++ b/.github/workflows/rust-docker-build.yml @@ -8,6 +8,7 @@ on: - '.github/workflows/rust-docker-build.yml' branches: - 'master' + - 'frank/rust-cd' jobs: build: @@ -99,10 +100,21 @@ jobs: echo "${{matrix.image}}_digest=${{ steps.docker_build.outputs.digest }}" >> $GITHUB_OUTPUT deploy: - name: Deploy capture-replay + name: Deploy ${{ matrix.release }} runs-on: ubuntu-latest needs: build - if: github.ref == 'refs/heads/master' + strategy: + matrix: + - release: capture-replay + values: + image: ${{ needs.build.outputs.capture_digest }} + - release: cyclotron-shard0 + values: + fetch_image: ${{ needs.build.outputs.cyclotron-fetch_digest }} + janitor_image: ${{ needs.build.outputs.cyclotron-janitor_digest }} + - release: property-defs-rs + values: + image: ${{ needs.build.outputs.property-defs-rs_digest }} steps: - name: get deployer token id: deployer @@ -111,20 +123,17 @@ jobs: app_id: ${{ secrets.DEPLOYER_APP_ID }} private_key: ${{ secrets.DEPLOYER_APP_PRIVATE_KEY }} - - name: Trigger livestream deployment + - name: Trigger ${{ matrix.release }} deployment uses: peter-evans/repository-dispatch@v3 + if: github.ref == 'refs/heads/master' with: token: ${{ steps.deployer.outputs.token }} repository: PostHog/charts event-type: commit_state_update client-payload: | { - "values": { - "image": { - "sha": "${{ needs.build.outputs.capture_digest }}" - } - }, - "release": "capture-replay", + "values": ${{ toJson(matrix.values) }}, + "release": "${{ matrix.release }}", "commit": ${{ toJson(github.event.head_commit) }}, "repository": ${{ toJson(github.repository) }}, "labels": [],