Skip to content

Commit

Permalink
feat(actions): update Azure/login@v1 (#1165)
Browse files Browse the repository at this point in the history
Created automatically.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Piotr Krzeminski <git@krzeminski.it>
  • Loading branch information
github-actions[bot] and krzema12 committed Dec 7, 2023
1 parent 64b4fde commit 9d5b59a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
2 changes: 1 addition & 1 deletion actions/Azure/login/v1/commit-hash.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
92a5484dfaf04ca78a94597f4f19fea633851fa2
de95379fe4dadc2defb305917eaa7e5dde727294
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import kotlin.collections.toTypedArray
/**
* Action: Azure Login
*
* Authenticate to Azureandrunyour Az CLI or Az PowerShellbased Actions or scripts. github.com/Azure/Actions
* Authenticate to Azure and run your Azure CLI or Azure PowerShell based actions or scripts.
*
* [Action on GitHub](https://github.com/Azure/login)
*/
Expand All @@ -44,7 +44,7 @@ public data class LoginV1 private constructor(
*/
public val subscriptionId: String? = null,
/**
* Setthisvalue to true to enableAzurePowerShellLogin in addition to Az CLIlogin
* Set this value to true to enable Azure PowerShell Login in addition to Azure CLI login
*/
public val enableAzPSSession: Boolean? = null,
/**
Expand All @@ -53,13 +53,18 @@ public data class LoginV1 private constructor(
*/
public val environment: LoginV1.Environment? = null,
/**
* Setthisvalue to trueto enable support for accessing tenants without subscriptions
* Set this value to true to enable support for accessing tenants without subscriptions
*/
public val allowNoSubscriptions: Boolean? = null,
/**
* Provide audience field for access-token. Default value is api://AzureADTokenExchange
*/
public val audience: String? = null,
/**
* The type of authentication. Supported values are SERVICE_PRINCIPAL, IDENTITY. Default value
* is SERVICE_PRINCIPAL
*/
public val authType: LoginV1.AuthType? = null,
/**
* Type-unsafe map where you can put any inputs that are not yet supported by the binding
*/
Expand All @@ -80,11 +85,12 @@ public data class LoginV1 private constructor(
environment: LoginV1.Environment? = null,
allowNoSubscriptions: Boolean? = null,
audience: String? = null,
authType: LoginV1.AuthType? = null,
_customInputs: Map<String, String> = mapOf(),
_customVersion: String? = null,
) : this(creds=creds, clientId=clientId, tenantId=tenantId, subscriptionId=subscriptionId,
enableAzPSSession=enableAzPSSession, environment=environment,
allowNoSubscriptions=allowNoSubscriptions, audience=audience,
allowNoSubscriptions=allowNoSubscriptions, audience=audience, authType=authType,
_customInputs=_customInputs, _customVersion=_customVersion)

@Suppress("SpreadOperator")
Expand All @@ -98,6 +104,7 @@ public data class LoginV1 private constructor(
environment?.let { "environment" to it.stringValue },
allowNoSubscriptions?.let { "allow-no-subscriptions" to it.toString() },
audience?.let { "audience" to it },
authType?.let { "auth-type" to it.stringValue },
*_customInputs.toList().toTypedArray(),
).toTypedArray()
)
Expand All @@ -121,4 +128,16 @@ public data class LoginV1 private constructor(
customStringValue: String,
) : LoginV1.Environment(customStringValue)
}

public sealed class AuthType(
public val stringValue: String,
) {
public object ServicePrincipal : LoginV1.AuthType("SERVICE_PRINCIPAL")

public object Identity : LoginV1.AuthType("IDENTITY")

public class Custom(
customStringValue: String,
) : LoginV1.AuthType(customStringValue)
}
}

0 comments on commit 9d5b59a

Please sign in to comment.