-
Notifications
You must be signed in to change notification settings - Fork 584
49 lines (39 loc) · 1.21 KB
/
deploy-k8s.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
name: Deploy to k8s
on:
workflow_dispatch:
inputs:
tag:
description: "Image Tag"
required: false
type: string
workflow_run:
workflows:
- Build & Publish images
types:
- completed
env:
DF_IMG_TAG: ${{ inputs.tag || github.sha }}
jobs:
build:
runs-on: ['self-hosted']
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Helm installer
uses: Azure/setup-helm@v3
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: Save DigitalOcean kubeconfig with short-lived credentials
run: doctl kubernetes cluster kubeconfig save --expiry-seconds 600 k8s-cicd-pipeline-tm
- name: Install router
run: |
helm upgrade --install router $GITHUB_WORKSPACE/deployment-scripts/helm-charts/deepfence-router
- name: Clean up console
continue-on-error: true
run: |
helm delete console
- name: Install console
run: |
helm upgrade --wait --install console $GITHUB_WORKSPACE/deployment-scripts/helm-charts/deepfence-console --set global.imageTag=${DF_IMG_TAG}