-
Notifications
You must be signed in to change notification settings - Fork 3
75 lines (63 loc) · 1.77 KB
/
infrastructure-deployment.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
on: [
workflow_dispatch
]
name: CraftedSpecially infrastructure deployment
jobs:
deploy-infrastructure:
runs-on: ubuntu-latest
steps:
# Checkout code
- uses: actions/checkout@main
# Log into Azure
- uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
# Deploy Bicep file
- name: Deploy bicep to Azure
uses: Azure/cli@v2
with:
azcliversion: 2.63.0
inlineScript: |
az config set bicep.use_binary_from_path=False
az deployment sub create \
--location westeurope \
--template-file ./Infrastructure/CraftedSpecially.bicep \
setup-namespaces:
runs-on: ubuntu-latest
needs: deploy-infrastructure
steps:
# Checkout code
- uses: actions/checkout@main
# Log into Azure
- uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Set AKS context
id: set-context
uses: azure/aks-set-context@v3
with:
resource-group: 'CraftedSpecially'
cluster-name: 'aks'
- name: Setup kubectl
id: install-kubectl
uses: azure/setup-kubectl@v3
- name: Deploy to AKS
id: deploy-aks
uses: Azure/k8s-deploy@v4
with:
namespace: 'default'
manifests: |
./Services/cluster-setup.yml
Continuous-Validation:
runs-on: ubuntu-latest
needs: setup-namespaces
environment: Continuous-validation
steps:
# Checkout code
- uses: actions/checkout@main
- name: Deploy Continuous Validation
id: deploy-continuous-validation
uses: ./.github/actions/continuous-validation
with:
AZURE_CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}