-
Notifications
You must be signed in to change notification settings - Fork 1
84 lines (84 loc) · 3.11 KB
/
build-main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
---
name: Staging/Prod | Build And Deploy
on:
push:
branches: [main]
env:
REGISTRY: ghcr.io
jobs: # We need two separate builds as each is going to a different ECR repo
build-staging:
permissions:
packages: write
id-token: write
uses: elastic-ipfs/shared-workflows/.github/workflows/lambda-shared-build.yaml@main
secrets:
aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }}
aws_role_id: ${{ secrets.AWS_ROLE_ID }}
aws_region: ${{ secrets.AWS_REGION }}
aws_ecr_repository: ${{ secrets.AWS_ECR_REPOSITORY_STAGING }}
build-prod:
permissions:
packages: write
id-token: write
uses: elastic-ipfs/shared-workflows/.github/workflows/lambda-shared-build.yaml@main
secrets:
aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }}
aws_role_id: ${{ secrets.AWS_ROLE_ID }}
aws_region: ${{ secrets.AWS_REGION }}
aws_ecr_repository: ${{ secrets.AWS_ECR_REPOSITORY }}
deploy-content-to-staging:
uses: elastic-ipfs/shared-workflows/.github/workflows/lambda-shared-deploy.yaml@main
permissions:
id-token: write
needs: build-staging
with:
deploy_to_environment: staging
lambda: staging-ep-publishing-content
docker_image_version: ${{ needs.build-staging.outputs.build_date }}
secrets:
aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }}
aws_role_id: ${{ secrets.AWS_ROLE_ID }}
aws_region: ${{ secrets.AWS_REGION }}
aws_ecr_repository: ${{ secrets.AWS_ECR_REPOSITORY_STAGING }}
deploy-advertisement-to-staging:
uses: elastic-ipfs/shared-workflows/.github/workflows/lambda-shared-deploy.yaml@main
permissions:
id-token: write
needs: build-staging
with:
deploy_to_environment: staging
lambda: staging-ep-publishing-advertisement
docker_image_version: ${{ needs.build-staging.outputs.build_date }}
secrets:
aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }}
aws_role_id: ${{ secrets.AWS_ROLE_ID }}
aws_region: ${{ secrets.AWS_REGION }}
aws_ecr_repository: ${{ secrets.AWS_ECR_REPOSITORY_STAGING }}
deploy-content-to-prod:
uses: elastic-ipfs/shared-workflows/.github/workflows/lambda-shared-deploy.yaml@main
permissions:
id-token: write
needs: build-prod
with:
deploy_to_environment: prod
lambda: publishing-content
docker_image_version: ${{ needs.build-prod.outputs.build_date }}
secrets:
aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }}
aws_role_id: ${{ secrets.AWS_ROLE_ID }}
aws_region: ${{ secrets.AWS_REGION }}
aws_ecr_repository: ${{ secrets.AWS_ECR_REPOSITORY }}
deploy-advertisement-to-prod:
uses: elastic-ipfs/shared-workflows/.github/workflows/lambda-shared-deploy.yaml@main
permissions:
id-token: write
needs: build-prod
with:
deploy_to_environment: prod
lambda: publishing-advertisement
docker_image_version: ${{ needs.build-prod.outputs.build_date }}
secrets:
aws_account_id: ${{ secrets.AWS_ACCOUNT_ID }}
aws_role_id: ${{ secrets.AWS_ROLE_ID }}
aws_region: ${{ secrets.AWS_REGION }}
aws_ecr_repository: ${{ secrets.AWS_ECR_REPOSITORY }}