Skip to content

Commit 3a0129c

Browse files
authored
Parallelize deploys (#1166)
1 parent e3d68f2 commit 3a0129c

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

.github/workflows/deploy-validation-server.yml

+17-14
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
permissions:
1515
contents: read
1616
packages: write
17+
outputs:
18+
digest: ${{ steps.push.outputs.digest }}
1719
steps:
1820
- name: Checkout
1921
uses: actions/checkout@v4
@@ -29,7 +31,7 @@ jobs:
2931
id: meta
3032
uses: docker/metadata-action@v5
3133
with:
32-
images: ghcr.io/xmtp/mls-validation-service
34+
images: ghcr.io/${{ github.repository_owner }}/mls-validation-service
3335

3436
- name: Build and push Docker image
3537
uses: docker/build-push-action@v6
@@ -41,22 +43,23 @@ jobs:
4143
tags: ${{ steps.meta.outputs.tags }}
4244
labels: ${{ steps.meta.outputs.labels }}
4345

44-
- name: Deploy (dev)
45-
uses: xmtp-labs/terraform-deployer@v1
46-
with:
47-
terraform-token: ${{ secrets.TERRAFORM_TOKEN }}
48-
terraform-org: xmtp
49-
terraform-workspace: dev
50-
variable-name: validation_service_image
51-
variable-value: "ghcr.io/xmtp/mls-validation-service@${{ steps.push.outputs.digest }}"
52-
variable-value-required-prefix: "ghcr.io/xmtp/mls-validation-service@sha256:"
46+
deploy:
47+
name: Deploy new images to infra
48+
runs-on: warp-ubuntu-latest-x64-16x
49+
needs: push_to_registry
50+
strategy:
51+
matrix:
52+
environment: [ dev, production, testnet ]
53+
steps:
54+
- name: Checkout
55+
uses: actions/checkout@v4
5356

54-
- name: Deploy (production)
57+
- name: Deploy to ${{ matrix.environment }}
5558
uses: xmtp-labs/terraform-deployer@v1
5659
with:
5760
terraform-token: ${{ secrets.TERRAFORM_TOKEN }}
5861
terraform-org: xmtp
59-
terraform-workspace: production
62+
terraform-workspace: ${{ matrix.environment }}
6063
variable-name: validation_service_image
61-
variable-value: "ghcr.io/xmtp/mls-validation-service@${{ steps.push.outputs.digest }}"
62-
variable-value-required-prefix: "ghcr.io/xmtp/mls-validation-service@sha256:"
64+
variable-value: "ghcr.io/xmtp/mls-validation-service@${{ needs.push_to_registry.outputs.digest }}"
65+
variable-value-required-prefix: "ghcr.io/xmtp/mls-validation-service@sha256:"

0 commit comments

Comments
 (0)