private static async authenticateAzureContainerRegistryAsync()

in azurecontainerapps.ts [368:381]


    private static async authenticateAzureContainerRegistryAsync() {
        this.registryUsername = this.toolHelper.getInput('acrUsername', false);
        this.registryPassword = this.toolHelper.getInput('acrPassword', false);
        this.registryUrl = `${this.acrName}.azurecr.io`;

        // Login to ACR if credentials were provided
        if (!this.util.isNullOrEmpty(this.registryUsername) && !this.util.isNullOrEmpty(this.registryPassword)) {
            this.toolHelper.writeInfo(`Logging in to ACR instance "${this.acrName}" with username and password credentials`);
            await this.registryHelper.loginContainerRegistryWithUsernamePassword(this.registryUrl, this.registryUsername, this.registryPassword);
        } else {
            this.toolHelper.writeInfo(`No ACR credentials provided; attempting to log in to ACR instance "${this.acrName}" with access token`);
            await this.registryHelper.loginAcrWithAccessTokenAsync(this.acrName);
        }
    }