-
Notifications
You must be signed in to change notification settings - Fork 14
124 lines (104 loc) · 3.25 KB
/
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# .github/workflows/deploy.yml
name: Deploy to Kubernetes
on:
workflow_call:
inputs:
envName:
description: 'Environment to deploy to'
required: true
type: string
default: staging
envUrl:
description: 'URL of the environment'
required: true
type: string
default: 'https://staging.kissj.net'
secrets:
KUBECONFIG:
description: 'KUBECONFIG for the cluster'
required: true
workflow_dispatch:
inputs:
envName:
description: 'Environment to deploy to'
required: true
type: string
default: staging
envUrl:
description: 'URL of the environment'
required: true
type: string
default: 'https://staging.kissj.net'
jobs:
deploy:
name: Deploy to Kubernetes
runs-on: 'ubuntu-latest'
environment:
name: ${{ inputs.envName }}
url: ${{ inputs.envUrl }}
steps:
- name: split url
uses: bhowell2/github-substring-action@v1
id: url
with:
value: ${{ inputs.envUrl }}
index_of_str: 'https://'
- uses: actions/checkout@v4
- name: 'Deploy'
uses: 'vimeda/[email protected]'
with:
release: kissj-${{ inputs.envName }}
namespace: 'kissj-${{ inputs.envName }}'
chart: 'deploy/helm/charts/kissj'
helm: 'helm3'
atomic: true
token: '${{ github.token }}'
values: |
postgres:
username: ${{ secrets.POSTGRES_USERNAME }}
password: ${{ secrets.POSTGRES_PASSWORD }}
host: ${{ secrets.POSTGRES_HOST }}
dbname: ${{ secrets.POSTGRES_DBNAME }}
caddy:
replicas: 2
hpa:
enabled: false
image:
name: quay.io/kissj/caddy-ubi
tag: ${{ inputs.envName}}-${{ github.sha }}
tls:
enabled: true
issuer: ${{ secrets.CERT_ISSUER}}
php:
replicas: 3
hpa:
enabled: false
maxReplicas: 3
minReplicas: 3
image:
name: quay.io/kissj/php-ubi
tag: ${{ inputs.envName}}-${{ github.sha }}
app:
url: ${{ steps.url.outputs.substring }}
s3:
bucket: ${{ secrets.S3_BUCKET }}
region: ${{ secrets.S3_REGION }}
endpoint: ${{ secrets.S3_ENDPOINT }}
key: ${{ secrets.S3_KEY }}
secret: ${{ secrets.S3_SECRET }}
mail:
server: ${{ secrets.MAIL_SERVER }}
username: ${{ secrets.MAIL_USERNAME }}
password: ${{ secrets.MAIL_PASSWORD }}
port: ${{ secrets.MAIL_PORT }}
dsn: ${{ secrets.MAIL_DSN }}
sentry:
dsn: ${{ secrets.SENTRY_DSN }}
skautis:
appId: ${{ secrets.SKAUTIS_APP_ID }}
useTest: ${{ secrets.SKAUTIS_USE_TEST }}
redis:
host: ${{ secrets.REDIS_HOST }}
password: ${{ secrets.REDIS_PASSWORD }}
env:
KUBECONFIG_FILE: ${{ secrets.KUBECONFIG }}