-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
50 lines (50 loc) · 1.87 KB
/
action.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
name: Check krane manifests
description: It executes `krane render` command to make sure that kube manifests have proper syntax. It does not run any yaml and schema validation for now
inputs:
ruby_version:
description: 'The version of ruby to install. If "false", does not install.'
required: false
default: '3.1'
krane_version:
description: 'The version of krane to install. If "false", does not install.'
required: false
default: '3.0.0'
kube_templates_dir:
description: 'The directory containing the kubernetes templates to validate.'
required: false
default: 'kubernetes/production'
kube_version_tag:
description: 'The project version tag.'
required: false
default: 'version_tag'
runs:
using: "composite"
steps:
- name: Get repo name
id: get_repository_name
uses: smartlyio/github-actions@get-repo-name-v1
- uses: ruby/setup-ruby@v1
if: inputs.ruby_version != 'false'
with:
ruby-version: ${{ inputs.ruby_version }}
- name: Install krane
if: inputs.krane_version != 'false'
shell: bash
run: gem install krane -v "${{ inputs.krane_version }}"
- name: Run kube config test
uses: smartlyio/krane-deploy-action@v4
with:
renderOnly: true
currentSha: ${{ github.sha }}
# Deliberately wrong cluster config to ensure no possibility of accidental deploy
dockerRegistry: rendertestdummy
kubernetesClusterDomain: rendertestdummy-cluster.smartly.io
kubernetesContext: kube-prod
kubernetesNamespace: ${{ steps.get_repository_name.outputs.repository_name }}
kubernetesTemplateDir: ${{ inputs.kube_templates_dir }}
extraBindings: |
{
"project_version_tag": "${{ inputs.kube_version_tag }}",
"canary_revision": "${{ github.sha }}",
"deployer": "deploy-user"
}