Skip to content

Commit

Permalink
deploy other rust services
Browse files Browse the repository at this point in the history
  • Loading branch information
frankh committed Sep 13, 2024
1 parent e26055b commit 106bf20
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions .github/workflows/rust-docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- '.github/workflows/rust-docker-build.yml'
branches:
- 'master'
- 'frank/rust-cd'

jobs:
build:
Expand Down Expand Up @@ -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
Expand All @@ -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": [],
Expand Down

0 comments on commit 106bf20

Please sign in to comment.