-
Notifications
You must be signed in to change notification settings - Fork 21
/
action.yml
112 lines (99 loc) · 5.57 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# Copyright 2020-2022 Björn Kautler
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Setup WSL
description: WSL Setup GitHub Action
author: Björn Kautler
branding:
icon: terminal
color: purple
inputs:
distribution:
description: |
The WSL distribution to install, update, or configure.
'Ubuntu-22.04' and 'Ubuntu-20.04' can not be used together at the same time.
They use the same WSL distribution ID, so the second that is used will not be installed
as the first one will be found as already installed by WSL distribution ID.
Valid values: 'Alpine', 'Debian', 'kali-linux', 'openSUSE-Leap-15.2', 'Ubuntu-24.04', 'Ubuntu-22.04', 'Ubuntu-20.04', 'Ubuntu-18.04', 'Ubuntu-16.04'
required: false
default: Debian
use-cache:
description: |
Whether to use the cache for the downloaded distribution installer.
This saves time in subsequent runs, jobs, or workflows but consumes space from
the available cache space of the repository.
Refer to https://github.com/marketplace/actions/cache for current usage limits.
Default is 'true' if the cache feature is available.
Default is 'false' if the cache feature is not available, for example because it was disabled on a GitHub Enterprise instance.
required: false
default: true | false
wsl-conf:
description: |
The content that will be written to /etc/wsl.conf of the installed distribution.
This can be used to adjust various settings as documented at
https://docs.microsoft.com/en-us/windows/wsl/wsl-config#configuration-settings-for-wslconf.
This can also be used if the distribution is installed already.
required: false
set-as-default:
description: |
Whether to set the distribution as default WSL distribution.
This can also be used if the distribution is installed already.
Default is 'true' if the distribution is going to be installed.
Default is 'false' if the distribution is only getting configured, updated, or additional packages installed.
The first installed WSL distribution is automatically the default one, independently of this input.
required: false
default: true | false
update:
description: |
Whether to update the distribution after installation.
This can also be used if the distribution is installed already.
required: false
default: 'false'
additional-packages:
description: |
Space separated list of additional packages to install after distribution installation.
This can also be used if the distribution is installed already.
required: false
wsl-shell-user:
description: |
The distribution user that should be used to execute run-step scripts with wsl-shell wrapper scripts
that are created or updated by the current action invocation. If no value is given, the default user of
the distribution at script execution time is used.
required: false
wsl-shell-command:
description: |
The command that is used in the wsl-shell wrapper scripts to execute the run-step script.
The name of the wrapper scripts will be derived from the first word in this input prefixed with 'wsl-'.
This means that for the default value, the wrapper scripts will start with 'wsl-bash'.
The run-step script file will be given as additional parameter in single quotes after the given string,
separated with one space character. The latter point is important, if you need to escape this space character.
If the given string contains at least once the sequence '{0}', all occurrences of it will be replaced by the
run-step script file without any quotes or anything and it will not be given as additional parameter.
This can be used if the script file is needed within the shell command opposed to as additional parameter.
This input can also be used if the distribution is installed already to change the wrapper scripts or generate
additional ones for other shells.
required: false
outputs:
wsl-shell-wrapper-path:
description: |
The path to the wsl-shell wrapper that is generated by the current action invocation.
Even if the current action invocation does not actually generate the script, because
wsl-shell-command is not set explicitly and the script already exists, this output will be set.
wsl-shell-distribution-wrapper-path:
description: |
The path to the distribution-specific wsl-shell wrapper that is generated by the current action invocation.
Even if the current action invocation does not actually generate the script, because
wsl-shell-command is not set explicitly and the script already exists, this output will be set.
runs:
using: node20
main: build/distributions/index.mjs