-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (48 loc) · 1.6 KB
/
manifest.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
name: "Manifest"
on:
push:
branches:
- main
paths:
- .github/workflows/manifest.yml
- 'manifests/**'
pull_request:
branches:
- main
paths:
- .github/workflows/manifest.yml
- 'manifests/**'
jobs:
manifest:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./manifests
permissions:
id-token: write
contents: read
pull-requests: write
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::202062340677:role/TechChallengeInfraDeployer
aws-region: ${{ vars.AWS_REGION }}
- name: Update kubeconfig
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: aws eks update-kubeconfig --name ${{ vars.AWS_EKS_CLUSTER_NAME }} --region ${{ vars.AWS_REGION }}
- name: Deploy to EKS
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: |
kubectl apply -f postgres-pv.yml
kubectl apply -f postgres-pvc.yml
kubectl apply -f postgres-secret.yml
kubectl apply -f postgres-deployment.yml
kubectl apply -f postgres-svc.yml
kubectl apply -f self-order-management-secret.yml
kubectl apply -f self-order-management-hpa.yml
kubectl apply -f self-order-management-load-balancer.yml
kubectl apply -f self-order-management-deployment.yml
kubectl apply -f self-order-management-svc.yml