Containers/Get-ImageNameForRepo.ps1

function Get-ImageNameForRepo {
    Param(
        [Parameter(Mandatory=$false)]
        [string]$SourcePath = (Get-Location)
    )

    $ImageName = Get-EnvironmentKeyValue -SourcePath $SourcePath -KeyName 'image'

    if ($ImageName -ne '') {
        $ImageName
    }
    else {
        Set-ImageNameForRepo -SourcePath $SourcePath
    }
}

function Set-ImageNameForRepo {
    Param(
        [Parameter(Mandatory=$false)]
        [string]$SourcePath = (Get-Location),
        [Parameter(Mandatory=$true)]
        [string]$ImageName
    )

    Set-EnvironmentKeyValue -SourcePath $SourcePath -KeyName 'image' -KeyValue $ImageName
}

Export-ModuleMember -Function Get-ImageNameForRepo
Export-ModuleMember -Function Set-ImageNameForRepo