@@ -53,6 +53,7 @@ import kotlin.collections.toTypedArray
5353 * @param sshStrict Whether to perform strict host key checking. When true, adds the options
5454 * `StrictHostKeyChecking=yes` and `CheckHostIP=no` to the SSH command line. Use the input
5555 * `ssh-known-hosts` to configure additional hosts.
56+ * @param sshUser The user to use when connecting to the remote SSH host. By default 'git' is used.
5657 * @param persistCredentials Whether to configure the token or SSH key with the local git config
5758 * @param path Relative path under $GITHUB_WORKSPACE to place the repository
5859 * @param clean Whether to execute `git clean -ffdx && git reset --hard HEAD` before fetching
@@ -125,6 +126,10 @@ public data class CheckoutV4 private constructor(
125126 * `ssh-known-hosts` to configure additional hosts.
126127 */
127128 public val sshStrict : Boolean? = null ,
129+ /* *
130+ * The user to use when connecting to the remote SSH host. By default 'git' is used.
131+ */
132+ public val sshUser : String? = null ,
128133 /* *
129134 * Whether to configure the token or SSH key with the local git config
130135 */
@@ -202,6 +207,7 @@ public data class CheckoutV4 private constructor(
202207 sshKey: String? = null ,
203208 sshKnownHosts: String? = null ,
204209 sshStrict: Boolean? = null ,
210+ sshUser: String? = null ,
205211 persistCredentials: Boolean? = null ,
206212 path: String? = null ,
207213 clean: Boolean? = null ,
@@ -218,12 +224,13 @@ public data class CheckoutV4 private constructor(
218224 _customInputs : Map <String , String > = mapOf (),
219225 _customVersion : String? = null ,
220226 ) : this (repository= repository, ref= ref, token= token, sshKey= sshKey,
221- sshKnownHosts= sshKnownHosts, sshStrict= sshStrict, persistCredentials= persistCredentials,
222- path= path, clean= clean, filter= filter, sparseCheckout= sparseCheckout,
223- sparseCheckoutConeMode= sparseCheckoutConeMode, fetchDepth= fetchDepth,
224- fetchTags= fetchTags, showProgress= showProgress, lfs= lfs, submodules= submodules,
225- setSafeDirectory= setSafeDirectory, githubServerUrl= githubServerUrl,
226- _customInputs = _customInputs , _customVersion = _customVersion )
227+ sshKnownHosts= sshKnownHosts, sshStrict= sshStrict, sshUser= sshUser,
228+ persistCredentials= persistCredentials, path= path, clean= clean, filter= filter,
229+ sparseCheckout= sparseCheckout, sparseCheckoutConeMode= sparseCheckoutConeMode,
230+ fetchDepth= fetchDepth, fetchTags= fetchTags, showProgress= showProgress, lfs= lfs,
231+ submodules= submodules, setSafeDirectory= setSafeDirectory,
232+ githubServerUrl= githubServerUrl, _customInputs = _customInputs ,
233+ _customVersion = _customVersion )
227234
228235 @Suppress(" SpreadOperator" )
229236 override fun toYamlArguments (): LinkedHashMap <String , String > = linkedMapOf(
@@ -234,6 +241,7 @@ public data class CheckoutV4 private constructor(
234241 sshKey?.let { " ssh-key" to it },
235242 sshKnownHosts?.let { " ssh-known-hosts" to it },
236243 sshStrict?.let { " ssh-strict" to it.toString() },
244+ sshUser?.let { " ssh-user" to it },
237245 persistCredentials?.let { " persist-credentials" to it.toString() },
238246 path?.let { " path" to it },
239247 clean?.let { " clean" to it.toString() },
0 commit comments