-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (51 loc) · 1.57 KB
/
deploy.yml
File metadata and controls
59 lines (51 loc) · 1.57 KB
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
name: Deploy
on:
workflow_dispatch:
inputs:
image_version:
description: Image version to deploy
type: string
required: true
jobs:
deploy:
name: Deploy version ${{ inputs.image_version }} to k8s
runs-on: ubuntu-latest
environment:
name: production
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v2
- name: Install Helm
uses: azure/setup-helm@v3
- name: Install DigitalOcean
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_TOKEN }}
- name: Setup DigitalOcean k8s config
run: doctl kubernetes cluster kubeconfig save --expiry-seconds 600 ${{ vars.CLUSTER_NAME }}
- name: Add helm repo
run: |
helm repo add romanow https://romanow.github.io/helm-charts/
helm repo update
- name: Install Postgres
run: |
helm upgrade \
postgres \
romanow/postgres \
--values k8s/postgres/values.yaml \
--install \
--wait
- name: Install application service
run: |
helm upgrade \
migration-application \
romanow/java-service \
--values=k8s/migration-application/values.yaml \
--set image.tag="$IMAGE_VERSION" \
--set ingress.name=k8s \
--set ingress.domain=romanow-alex.ru \
--description "$IMAGE_VERSION" \
--install \
--wait
env:
IMAGE_VERSION: ${{ inputs.image_version }}