-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (82 loc) · 2.43 KB
/
prd-deploy.yaml
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: Production Deploy
on:
push:
branches:
- main
permissions:
id-token: write
contents: read
packages: write
jobs:
path-filter:
runs-on: ubuntu-latest
outputs:
kube: ${{ steps.path-filter.outputs.kube }}
svcmtr: ${{ steps.path-filter.outputs.svcmtr }}
gcp: ${{ steps.path-filter.outputs.gcp }}
aws: ${{ steps.path-filter.outputs.aws }}
fluxupd: ${{ steps.path-filter.outputs.fluxupd }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: path-filter
with:
filters: |
kube:
- "kubernetes/**"
- ".github/workflows/prd-deploy.yaml"
svcmtr:
- "service-monitor/**"
- ".github/workflows/prd-deploy.yaml"
gcp:
- "gcp/**"
- ".github/workflows/prd-deploy.yaml"
aws:
- "aws/**"
- ".github/workflows/prd-deploy.yaml"
fluxupd:
- "flux-target-updater/**"
- ".github/workflows/prd-deploy.yaml"
gcp-apply:
runs-on: ubuntu-latest
needs: path-filter
environment: production
if: needs.path-filter.outputs.gcp == 'true'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Terraform Apply
uses: ./.github/actions/gcp-apply
with:
env: production
gcp-project: ${{ vars.PRD_GCP_PROJECT }}
gcp-project-number: ${{ vars.PRD_GCP_PROJECT_NUMBER }}
aws-apply:
runs-on: ubuntu-latest
needs: path-filter
environment: production
if: needs.path-filter.outputs.aws == 'true'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Terraform Apply
uses: ./.github/actions/aws-apply
with:
env: "production"
aws-region: ${{ vars.AWS_REGION }}
aws-role-arn: ${{ vars.AWS_GITHUB_ACTIONS_ROLE_ARN }}
gh-token: ${{ secrets.GITHUB_TOKEN }}
service-monitor:
runs-on: ubuntu-latest
needs: path-filter
if: needs.path-filter.outputs.svcmtr == 'true'
environment: production
steps:
- name: checkout
uses: actions/checkout@v4
- name: Deploy
uses: ./.github/actions/service-monitor-deploy
with:
func-name: service-monitor
aws-region: ${{ secrets.AWS_REGION }}
aws-update-health-check-arn: ${{ vars.AWS_GITHUB_ACTIONS_ROLE_ARN }}