14
14
permissions :
15
15
contents : read
16
16
packages : write
17
+ outputs :
18
+ digest : ${{ steps.push.outputs.digest }}
17
19
steps :
18
20
- name : Checkout
19
21
uses : actions/checkout@v4
29
31
id : meta
30
32
uses : docker/metadata-action@v5
31
33
with :
32
- images : ghcr.io/xmtp /mls-validation-service
34
+ images : ghcr.io/${{ github.repository_owner }} /mls-validation-service
33
35
34
36
- name : Build and push Docker image
35
37
uses : docker/build-push-action@v6
@@ -41,22 +43,23 @@ jobs:
41
43
tags : ${{ steps.meta.outputs.tags }}
42
44
labels : ${{ steps.meta.outputs.labels }}
43
45
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
53
56
54
- - name : Deploy (production)
57
+ - name : Deploy to ${{ matrix.environment }}
55
58
uses : xmtp-labs/terraform-deployer@v1
56
59
with :
57
60
terraform-token : ${{ secrets.TERRAFORM_TOKEN }}
58
61
terraform-org : xmtp
59
- terraform-workspace : production
62
+ terraform-workspace : ${{ matrix.environment }}
60
63
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