mirror of
https://github.com/moonrepo/setup-rust.git
synced 2025-04-29 21:40:01 +00:00
Add setting.
This commit is contained in:
parent
872c93e939
commit
ee7dba7e21
2 changed files with 14 additions and 3 deletions
|
@ -17,6 +17,9 @@ inputs:
|
||||||
description: 'Comma-separated list of additional targets to install.'
|
description: 'Comma-separated list of additional targets to install.'
|
||||||
profile:
|
profile:
|
||||||
description: 'Profile to install. Defaults to "minimal".'
|
description: 'Profile to install. Defaults to "minimal".'
|
||||||
|
inherit-toolchain:
|
||||||
|
description: 'Inherit all toolchain settings from the rust-toolchain.toml file.'
|
||||||
|
default: false
|
||||||
outputs:
|
outputs:
|
||||||
cache-key:
|
cache-key:
|
||||||
description: 'The generated cache key used.'
|
description: 'The generated cache key used.'
|
||||||
|
|
|
@ -69,11 +69,19 @@ export function parseConfig(configPath: string): Partial<Toolchain> {
|
||||||
|
|
||||||
const config = TOML.parse(contents) as unknown as ToolchainConfig;
|
const config = TOML.parse(contents) as unknown as ToolchainConfig;
|
||||||
|
|
||||||
|
if (config.toolchain) {
|
||||||
|
if (core.getBooleanInput('inherit-toolchain')) {
|
||||||
|
core.debug('Inheriting entire [toolchain] section');
|
||||||
|
|
||||||
|
return { ...config.toolchain };
|
||||||
|
}
|
||||||
|
|
||||||
if (config.toolchain.channel) {
|
if (config.toolchain.channel) {
|
||||||
core.debug('Found channel in [toolchain] section');
|
core.debug('Found channel in [toolchain] section');
|
||||||
|
|
||||||
return { channel: config.toolchain.channel };
|
return { channel: config.toolchain.channel };
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
core.debug('No channel found in [toolchain] section');
|
core.debug('No channel found in [toolchain] section');
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue