Add support for specifying toolchain profile
This commit is contained in:
		@@ -8,6 +8,9 @@ inputs:
 | 
				
			|||||||
  rust-version:
 | 
					  rust-version:
 | 
				
			||||||
    description: The toolchain version; such as stable, nightly, or 1.8.0
 | 
					    description: The toolchain version; such as stable, nightly, or 1.8.0
 | 
				
			||||||
    default: stable
 | 
					    default: stable
 | 
				
			||||||
 | 
					  profile:
 | 
				
			||||||
 | 
					    description: The toolchain profile to install
 | 
				
			||||||
 | 
					    default: default
 | 
				
			||||||
  components:
 | 
					  components:
 | 
				
			||||||
    description: The toolchain components to install, comma-separated
 | 
					    description: The toolchain components to install, comma-separated
 | 
				
			||||||
    default: ""
 | 
					    default: ""
 | 
				
			||||||
@@ -22,5 +25,6 @@ runs:
 | 
				
			|||||||
      shell: bash
 | 
					      shell: bash
 | 
				
			||||||
      env:
 | 
					      env:
 | 
				
			||||||
        INPUT_RUST_VERSION: ${{ inputs.rust-version }}
 | 
					        INPUT_RUST_VERSION: ${{ inputs.rust-version }}
 | 
				
			||||||
 | 
					        INPUT_PROFILE: ${{ inputs.profile }}
 | 
				
			||||||
        INPUT_COMPONENTS: ${{ inputs.components }}
 | 
					        INPUT_COMPONENTS: ${{ inputs.components }}
 | 
				
			||||||
        INPUT_TARGETS: ${{ inputs.targets }}
 | 
					        INPUT_TARGETS: ${{ inputs.targets }}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								setup.sh
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								setup.sh
									
									
									
									
									
								
							@@ -12,7 +12,7 @@ args=()
 | 
				
			|||||||
# shellcheck disable=SC2206
 | 
					# shellcheck disable=SC2206
 | 
				
			||||||
[[ -n "${INPUT_TARGETS}" ]] && args+=(-t "${INPUT_TARGETS// /}")
 | 
					[[ -n "${INPUT_TARGETS}" ]] && args+=(-t "${INPUT_TARGETS// /}")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
rustup toolchain install "${INPUT_RUST_VERSION}" "${args[@]}"
 | 
					rustup toolchain install "${INPUT_RUST_VERSION}" --profile "${INPUT_PROFILE}" "${args[@]}"
 | 
				
			||||||
rustup default "${INPUT_RUST_VERSION}"
 | 
					rustup default "${INPUT_RUST_VERSION}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# shellcheck disable=SC2129
 | 
					# shellcheck disable=SC2129
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user