| distribution | The WSL distribution to install, update, or configure.
Valid values:
- 'Alpine-3.23'
- 'Alpine-3.22'
- 'Alpine-3.21'
- 'Alpine-3.20'
- 'Alpine-3.19'
- 'Alpine-3.18'
- 'Alpine-3.17'
- 'Debian-13'
- 'Debian-12'
- 'Debian-11'
- 'kali-linux'
- 'openSUSE-Leap-15.2'
- 'Ubuntu-24.04'
- 'Ubuntu-22.04'
- 'Ubuntu-20.04'
- 'Ubuntu-18.04'
- 'Ubuntu-16.04'
| no | Debian-13 |
| use-cache | 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.
| no | true | false |
| wsl-conf | 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.
WARNING: Setting this option will overwrite any existing content of the file.
Some distributions like Debian-12+ and Ubuntu-24.04+ ship with a default wsl.conf file.
Make sure to check whether a file exists by default and whether you want to include
its contents in your configured value.
| no | — |
| set-as-default | 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.
| no | true | false |
| update | Whether to update the distribution after installation.
This can also be used if the distribution is installed already.
| no | false |
| additional-packages | Space separated list of additional packages to install after distribution installation.
This can also be used if the distribution is installed already.
| no | — |
| wsl-shell-user | 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.
| no | — |
| wsl-shell-command | 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.
| no | — |
| wsl-version | The WSL version that should be used. This can be set to any positive integer. Using an untested one might
work or break, so issues a warning for the action run. Currently, WSLv1 and WSLv2 are tested and do not
issue a warning. If a new WSL version is available and your workflow works with it, please report an issue
so that proper tests can be added and the warning for that version removed.
| no | 2 |