-
Notifications
You must be signed in to change notification settings - Fork 1
/
sample-deploy.yml
42 lines (41 loc) · 1.3 KB
/
sample-deploy.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
name: deploy
on:
# Automatic deployments on every new release
release:
types:
- 'published'
# Manual deployment
workflow_dispatch:
inputs:
deployment:
description: 'Deployment name'
required: true
default: 'echo-server'
namespace:
description: 'Kubernetes namespace to deploy into'
required: true
default: 'dev'
version:
description: 'Specific application version to deploy (used as image tag)'
required: false
default: ''
jobs:
deploy:
name: run deployment
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
# Checkout code
- name: Checkout repository
uses: actions/checkout@v3
# Deploy chart
- name: Helm chart deployment
uses: bryk-io/chart-deploy-action@v1.2.0
with:
name: ${{ github.event.inputs.deployment || 'echo-server' }}
namespace: ${{ github.event.inputs.namespace || 'dev' }}
version: ${{ github.event.inputs.version }}
env:
# Use the name space as prefix to load the required secrets
KUBECTL_CONFIG: ${{ secrets[format('kubectl_config_{0}', github.event.inputs.namespace)] }}
CHART_VALUES: ${{ secrets[format('chart_values_{0}', github.event.inputs.namespace)] }}