-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
48 lines (43 loc) · 1.19 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
# Copyright (c) 2024 OpenFaaS Ltd
name: 'setup-k3sup'
description: 'Install K3s with k3sup'
branding:
icon: 'arrow-right-circle'
color: 'gray-dark'
inputs:
cache:
description: Whether to enable caching for the downloaded k3sup binary
required: false
default: 'false'
runs:
using: 'composite'
steps:
- if: inputs.cache == 'true'
id: cache-k3sup
uses: actions/cache@v4
with:
path: |
/usr/local/bin/k3sup
key: ${{ runner.os }}-${{ runner.arch }}-k3sup
- if: ${{ steps.cache-k3sup.outputs.cache-hit != 'true' }}
name: Install k3sup
shell: bash
run: |
curl -sLS https://get.k3sup.dev | sudo -E sh
- name: Install k3s and merge into kubeconfig
shell: bash
run: |
mkdir -p ~/.kube/
k3sup install \
--local \
--k3s-channel latest \
--merge \
--local-path ~/.kube/config
- name: Wait until k3s is ready
shell: bash
run: |
k3sup ready \
--kubeconfig ~/.kube/config \
--context default \
--pause 1s \
--attempts 60