-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
action.yaml
59 lines (58 loc) · 1.81 KB
/
action.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
name: Setup K3d/K3s
description: Setup a lightweight Kubernetes cluster with K3d/K3s
author: nolar
branding:
icon: cloud
color: yellow
inputs:
version:
description: Full or partial version of K3s, or `latest`.
required: true
default: latest
k3d-tag:
description: K3d tag/version to use (by default, the latest one).
required: false
default: latest
k3d-name:
description: Cluster name.
required: false
k3d-args:
description: Additional arguments to k3d cluster create.
required: false
github-token:
description: Optional GitHub token to overcome API rate limiting.
required: false
skip-creation:
description: Skip creating the cluster and waiting for its readiness?
required: false
skip-readiness:
description: Skip waiting for full cluster readiness?
required: false
outputs:
k3d-version:
description: Actual version of K3d detected and used.
value: ${{ steps.main.outputs.k3d-version }}
k3s-version:
description: Actual version of K3s detected and used.
value: ${{ steps.main.outputs.k3s-version }}
k8s-version:
description: Actual version of K8s detected and used.
value: ${{ steps.main.outputs.k8s-version }}
runs:
using: composite
steps:
- id: main
shell: bash
run: ${{ github.action_path }}/action.sh
env:
VERSION: ${{ inputs.version }}
K3D_TAG: ${{ inputs.k3d-tag }}
K3D_NAME: ${{ inputs.k3d-name }}
K3D_ARGS: ${{ inputs.k3d-args }}
GITHUB_TOKEN: ${{ inputs.github-token }}
SKIP_CREATION: ${{ inputs.skip-creation && 'yes' || '' }}
SKIP_READINESS: ${{ inputs.skip-readiness && 'yes' || '' }}
# Validate that everything is installed, is on PATH, and generally works.
- shell: bash
run: kubectl version
if: ${{ !inputs.skip-creation }}