Skip to content

Commit

Permalink
Use UTF8 encoding to handle special characters in GITHUB_OUTPUT and G…
Browse files Browse the repository at this point in the history
…ITHUB_ENV (microsoft#630)

Fix microsoft#629 

Use UTF8 encoding to handle special characters in GITHUB_OUTPUT and
GITHUB_ENV.
  • Loading branch information
mazhelez authored Jul 29, 2023
1 parent 588e5ea commit 7c65dae
Show file tree
Hide file tree
Showing 45 changed files with 191 additions and 162 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CleanupTempRepos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
if ($orgmap.PSObject.Properties.Name -eq $githubOwner) {
$githubOwner = $orgmap."$githubOwner"
}
Add-Content -Path $env:GITHUB_OUTPUT -Value "githubOwner=$githubOwner"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "githubOwner=$githubOwner"
Write-Host "githubOwner=$githubOwner"
RemoveRepositories:
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/E2E.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ jobs:
if ($githubOwner -eq $ENV:GITHUB_REPOSITORY_OWNER) {
$maxParallel = 8
}
Add-Content -Path $env:GITHUB_OUTPUT -Value "maxParallel=$maxParallel"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "maxParallel=$maxParallel"
Write-Host "maxParallel=$maxParallel"
Add-Content -Path $env:GITHUB_OUTPUT -Value "githubOwner=$githubOwner"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "githubOwner=$githubOwner"
Write-Host "githubOwner=$githubOwner"
SetupRepositories:
Expand Down Expand Up @@ -150,7 +150,7 @@ jobs:
"max-parallel" = $maxParallel
"fail-fast" = $false
} | ConvertTo-Json -depth 99 -compress
Add-Content -Path $env:GITHUB_OUTPUT -Value "testruns=$testrunsJson"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "testruns=$testrunsJson"
Write-Host "testruns=$testrunsJson"
$releases = @(gh release list --repo microsoft/AL-Go | ForEach-Object { $_.split("`t")[0] })
Expand All @@ -161,7 +161,7 @@ jobs:
"max-parallel" = $maxParallel
"fail-fast" = $false
} | ConvertTo-Json -depth 99 -compress
Add-Content -Path $env:GITHUB_OUTPUT -Value "releases=$releasesJson"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "releases=$releasesJson"
Write-Host "releases=$releasesJson"
$scenariosJson = @{
Expand All @@ -171,7 +171,7 @@ jobs:
"max-parallel" = $maxParallel
"fail-fast" = $false
} | ConvertTo-Json -depth 99 -compress
Add-Content -Path $env:GITHUB_OUTPUT -Value "scenarios=$scenariosJson"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "scenarios=$scenariosJson"
Write-Host "scenarios=$scenariosJson"
Scenario:
Expand All @@ -189,7 +189,7 @@ jobs:
run: |
$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0
$reponame = [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetTempFileName())
Add-Content -Path $env:GITHUB_OUTPUT -Value "repoName='$repoName'"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "repoName='$repoName'"
Write-Host "repoName='$repoName'"
Write-Host "Repo URL: https://github.com/${{ needs.Check.outputs.githubowner }}/$repoName"
Expand Down Expand Up @@ -231,11 +231,11 @@ jobs:
else {
$template = '${{ needs.Check.outputs.githubowner }}/${{ needs.SetupRepositories.outputs.perTenantExtensionRepo }}'
}
Add-Content -Path $env:GITHUB_OUTPUT -Value "adminCenterApiCredentials='$adminCenterApiCredentials'"
Add-Content -Path $env:GITHUB_OUTPUT -Value "licenseFileUrl='$licenseFileUrl'"
Add-Content -Path $env:GITHUB_OUTPUT -Value "template='$template'"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "adminCenterApiCredentials='$adminCenterApiCredentials'"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "licenseFileUrl='$licenseFileUrl'"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "template='$template'"
$reponame = [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetTempFileName())
Add-Content -Path $env:GITHUB_OUTPUT -Value "repoName='$repoName'"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "repoName='$repoName'"
Write-Host "repoName='$repoName'"
Write-Host "Repo URL: https://github.com/${{ needs.Check.outputs.githubowner }}/$repoName"
Expand Down Expand Up @@ -275,11 +275,11 @@ jobs:
$template = '${{ needs.Check.outputs.githubowner }}/${{ needs.SetupRepositories.outputs.perTenantExtensionRepo }}'
$contentPath = 'pte'
}
Add-Content -Path $env:GITHUB_OUTPUT -Value "licenseFileUrl='$licenseFileUrl'"
Add-Content -Path $env:GITHUB_OUTPUT -Value "template='$template'"
Add-Content -Path $env:GITHUB_OUTPUT -Value "contentPath='$contentPath'"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "licenseFileUrl='$licenseFileUrl'"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "template='$template'"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "contentPath='$contentPath'"
$reponame = [System.IO.Path]::GetFileNameWithoutExtension([System.IO.Path]::GetTempFileName())
Add-Content -Path $env:GITHUB_OUTPUT -Value "repoName='$repoName'"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "repoName='$repoName'"
Write-Host "repoName='$repoName'"
Write-Host "Repo URL: https://github.com/${{ needs.Check.outputs.githubowner }}/$repoName"
Expand Down
2 changes: 1 addition & 1 deletion Actions/AnalyzeTests/AnalyzeTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ try {
$testResults = [xml](Get-Content "$project\TestResults.xml")
$testResultSummary = GetTestResultSummary -testResults $testResults -includeFailures 50

Add-Content -Path $env:GITHUB_OUTPUT -Value "TestResultMD=$testResultSummary"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "TestResultMD=$testResultSummary"
Write-Host "TestResultMD=$testResultSummary"

Add-Content -path $ENV:GITHUB_STEP_SUMMARY -value "$($testResultSummary.Replace("\n","`n"))`n"
Expand Down
4 changes: 2 additions & 2 deletions Actions/CalculateArtifactNames/CalculateArtifactNames.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ Param(

function Set-EnvVariable([string] $name, [string] $value) {
Write-Host "Assigning $value to $name"
Add-Content -Path $env:GITHUB_OUTPUT -Value "$name=$value"
Add-Content -Path $env:GITHUB_ENV -Value "$name=$value"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "$name=$value"
Add-Content -Encoding UTF8 -Path $env:GITHUB_ENV -Value "$name=$value"
}

$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0
Expand Down
4 changes: 2 additions & 2 deletions Actions/CreateReleaseNotes/CreateReleaseNotes.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ try {
}
}
}
Add-Content -Path $env:GITHUB_OUTPUT -Value "releaseBranch=$releaseBranch"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "releaseBranch=$releaseBranch"
Write-Host "releaseBranch=$releaseBranch"

$latestRelease = GetLatestRelease -token $token -api_url $ENV:GITHUB_API_URL -repository $ENV:GITHUB_REPOSITORY -ref $ENV:GITHUB_REF_NAME
Expand All @@ -66,7 +66,7 @@ try {
OutputWarning -message "You can modify the release note from the release page later."
$releaseNotes = ""
}
Add-Content -Path $env:GITHUB_OUTPUT -Value "releaseNotes=$releaseNotes"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "releaseNotes=$releaseNotes"
Write-Host "releaseNotes=$releaseNotes"

TrackTrace -telemetryScope $telemetryScope
Expand Down
8 changes: 4 additions & 4 deletions Actions/DetermineArtifactUrl/DetermineArtifactUrl.Action.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ try {

#region Action: Output
# Set output variables
Add-Content -Path $env:GITHUB_OUTPUT -Value "ArtifactUrl=$artifactUrl"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "ArtifactUrl=$artifactUrl"
Write-Host "ArtifactUrl=$artifactUrl"
Add-Content -Path $env:GITHUB_OUTPUT -Value "ArtifactCacheKey=$artifactCacheKey"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "ArtifactCacheKey=$artifactCacheKey"
Write-Host "ArtifactCacheKey=$artifactCacheKey"
$outSettingsJson = $projectSettings | ConvertTo-Json -Depth 99 -Compress
Add-Content -Path $env:GITHUB_ENV -Value "Settings=$OutSettingsJson"
Add-Content -Encoding UTF8 -Path $env:GITHUB_ENV -Value "Settings=$OutSettingsJson"
Write-Host "SettingsJson=$outSettingsJson"
Add-Content -Path $env:GITHUB_ENV -Value "artifact=$artifactUrl"
Add-Content -Encoding UTF8 -Path $env:GITHUB_ENV -Value "artifact=$artifactUrl"
Write-Host "Artifact=$artifactUrl"
#endregion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ try {
$buildOrderJson = ConvertTo-Json $buildOrder -Depth 99 -Compress

# Set output variables
Add-Content -Path $env:GITHUB_OUTPUT -Value "ProjectsJson=$projectsJson"
Add-Content -Path $env:GITHUB_OUTPUT -Value "ProjectDependenciesJson=$projectDependenciesJson"
Add-Content -Path $env:GITHUB_OUTPUT -Value "BuildOrderJson=$buildOrderJson"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "ProjectsJson=$projectsJson"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "ProjectDependenciesJson=$projectDependenciesJson"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "BuildOrderJson=$buildOrderJson"

Write-Host "ProjectsJson=$projectsJson"
Write-Host "ProjectDependenciesJson=$projectDependenciesJson"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,5 +124,5 @@ Write-Host "Downloaded dependencies test apps: $($DownloadedTestApps -join ', ')
$DownloadedAppsJson = ConvertTo-Json $DownloadedApps -Depth 99 -Compress
$DownloadedTestAppsJson = ConvertTo-Json $DownloadedTestApps -Depth 99 -Compress

Add-Content -Path $env:GITHUB_OUTPUT -Value "DownloadedApps=$DownloadedAppsJson"
Add-Content -Path $env:GITHUB_OUTPUT -Value "DownloadedTestApps=$DownloadedTestAppsJson"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "DownloadedApps=$DownloadedAppsJson"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "DownloadedTestApps=$DownloadedTestAppsJson"
6 changes: 3 additions & 3 deletions Actions/ReadSecrets/ReadSecrets.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ try {
}
}
$base64value = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($value))
Add-Content -Path $env:GITHUB_ENV -Value "$envVar=$base64value"
Add-Content -Encoding UTF8 -Path $env:GITHUB_ENV -Value "$envVar=$base64value"
$outSecrets += @{ "$envVar" = $base64value }
Write-Host "$envVar successfully read from secret $secret"
$secretsCollection.Remove($_)
Expand Down Expand Up @@ -114,10 +114,10 @@ try {
}

$outSecretsJson = $outSecrets | ConvertTo-Json -Compress
Add-Content -Path $env:GITHUB_ENV -Value "RepoSecrets=$outSecretsJson"
Add-Content -Encoding UTF8 -Path $env:GITHUB_ENV -Value "RepoSecrets=$outSecretsJson"

$outSettingsJson = $outSettings | ConvertTo-Json -Depth 99 -Compress
Add-Content -Path $env:GITHUB_ENV -Value "Settings=$OutSettingsJson"
Add-Content -Encoding UTF8 -Path $env:GITHUB_ENV -Value "Settings=$OutSettingsJson"

TrackTrace -telemetryScope $telemetryScope
}
Expand Down
2 changes: 1 addition & 1 deletion Actions/ReadSecrets/ReadSecretsHelper.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function GetGithubSecret {
$value = $script:githubSecrets."$secret"
if ($value) {
MaskValue -key $secret -value $value
Add-Content -Path $env:GITHUB_ENV -Value "$envVar=$value"
Add-Content -Encoding UTF8 -Path $env:GITHUB_ENV -Value "$envVar=$value"
return $value
}
}
Expand Down
20 changes: 10 additions & 10 deletions Actions/ReadSettings/ReadSettings.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -80,24 +80,24 @@ try {
$settingValue = $settings."$setting"
$outSettings += @{ "$setting" = $settingValue }
if ($settingValue -is [System.Collections.Specialized.OrderedDictionary]) {
Add-Content -Path $env:GITHUB_ENV -Value "$setting=$($settingValue | ConvertTo-Json -Depth 99 -Compress)"
Add-Content -Encoding UTF8 -Path $env:GITHUB_ENV -Value "$setting=$($settingValue | ConvertTo-Json -Depth 99 -Compress)"
}
else {
Add-Content -Path $env:GITHUB_ENV -Value "$setting=$settingValue"
Add-Content -Encoding UTF8 -Path $env:GITHUB_ENV -Value "$setting=$settingValue"
}
}

$outSettingsJson = $outSettings | ConvertTo-Json -Depth 99 -Compress
Add-Content -Path $env:GITHUB_OUTPUT -Value "SettingsJson=$outSettingsJson"
Add-Content -Path $env:GITHUB_ENV -Value "Settings=$OutSettingsJson"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "SettingsJson=$outSettingsJson"
Add-Content -Encoding UTF8 -Path $env:GITHUB_ENV -Value "Settings=$OutSettingsJson"
Write-Host "SettingsJson=$outSettingsJson"

$gitHubRunner = $settings.githubRunner.Split(',').Trim() | ConvertTo-Json -compress
Add-Content -Path $env:GITHUB_OUTPUT -Value "GitHubRunnerJson=$githubRunner"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "GitHubRunnerJson=$githubRunner"
Write-Host "GitHubRunnerJson=$githubRunner"

$gitHubRunnerShell = $settings.githubRunnerShell
Add-Content -Path $env:GITHUB_OUTPUT -Value "GitHubRunnerShell=$githubRunnerShell"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "GitHubRunnerShell=$githubRunnerShell"
Write-Host "GitHubRunnerShell=$githubRunnerShell"

if ($getenvironments) {
Expand Down Expand Up @@ -187,12 +187,12 @@ try {
$json.matrix.include += @{ "environment" = $_; "os" = "$($runson | ConvertTo-Json -compress)" }
}
$environmentsJson = $json | ConvertTo-Json -Depth 99 -compress
Add-Content -Path $env:GITHUB_OUTPUT -Value "EnvironmentsJson=$environmentsJson"
Add-Content -Path $env:GITHUB_ENV -Value "environments=$environmentsJson"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "EnvironmentsJson=$environmentsJson"
Add-Content -Encoding UTF8 -Path $env:GITHUB_ENV -Value "environments=$environmentsJson"
Write-Host "EnvironmentsJson=$environmentsJson"
Add-Content -Path $env:GITHUB_OUTPUT -Value "EnvironmentCount=$($environments.Count)"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "EnvironmentCount=$($environments.Count)"
Write-Host "EnvironmentCount=$($environments.Count)"
Add-Content -Path $env:GITHUB_OUTPUT -Value "UnknownEnvironment=$unknownEnvironment"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "UnknownEnvironment=$unknownEnvironment"
Write-Host "UnknownEnvironment=$unknownEnvironment"
}

Expand Down
2 changes: 1 addition & 1 deletion Actions/RunPipeline/RunPipeline.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ try {
$buildOutputFile = Join-Path $projectPath "BuildOutput.txt"
$containerEventLogFile = Join-Path $projectPath "ContainerEventLog.evtx"

"containerName=$containerName" | Add-Content $ENV:GITHUB_ENV
Add-Content -Encoding UTF8 -Path $env:GITHUB_ENV -Value "containerName=$containerName"

Set-Location $projectPath
$runAlPipelineOverrides | ForEach-Object {
Expand Down
4 changes: 2 additions & 2 deletions Actions/WorkflowInitialize/WorkflowInitialize.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ try {
$correlationId = [guid]::Empty.ToString()
}

Add-Content -Path $env:GITHUB_OUTPUT -Value "telemetryScopeJson=$scopeJson"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "telemetryScopeJson=$scopeJson"
Write-Host "telemetryScopeJson=$scopeJson"

Add-Content -Path $env:GITHUB_OUTPUT -Value "correlationId=$correlationId"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "correlationId=$correlationId"
Write-Host "correlationId=$correlationId"
}
catch {
Expand Down
1 change: 1 addition & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Issue 528 Give better error messages when uploading to storage accounts
Create Online Development environment workflow failed in AppSource template unless AppSourceCopMandatoryAffixes is defined in repository settings file
Create Online Development environment workflow didn't have a project parameter and only worked for single project repositories
Create Online Development environment workflow didn't work if runs-on was set to Linux
Special characters are not supported in RepoName, Project names or other settings - Use UTF8 encoding to handle special characters in GITHUB_OUTPUT and GITHUB_ENV

### Issue 555
AL-Go contains several workflows, which create a Pull Request or pushes code directly.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
} else {
$ghToken = '${{ secrets.GITHUB_TOKEN }}'
}
Add-Content -Path $env:GITHUB_OUTPUT -Value "ghToken=$ghToken"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "ghToken=$ghToken"
- name: Add existing app
uses: microsoft/AL-Go-Actions/AddExistingApp@main
Expand Down
20 changes: 10 additions & 10 deletions Templates/AppSource App/.github/workflows/CICD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Determine Workflow Depth
id: DetermineWorkflowDepth
run: |
Add-Content -Path $env:GITHUB_OUTPUT -Value "WorkflowDepth=$($env:workflowDepth)"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "WorkflowDepth=$($env:workflowDepth)"
- name: Determine Projects To Build
id: determineProjectsToBuild
Expand All @@ -82,7 +82,7 @@ jobs:
$deliveryTarget = [System.IO.Path]::GetFileNameWithoutExtension($_.Name.SubString($namePrefix.Length))
$deliveryTargetSecrets += @("$($deliveryTarget)Context")
}
Add-Content -Path $env:GITHUB_OUTPUT -Value "Secrets=$($deliveryTargetSecrets -join ',')"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "Secrets=$($deliveryTargetSecrets -join ',')"
- name: Read secrets
uses: microsoft/AL-Go-Actions/ReadSecrets@main
Expand Down Expand Up @@ -145,11 +145,11 @@ jobs:
})
$deliveryTargetsJson = $deliveryTargets | ConvertTo-Json -Depth 99 -compress
if ($deliveryTargets.Count -lt 2) { $deliveryTargetsJson = "[$($deliveryTargetsJson)]" }
Add-Content -Path $env:GITHUB_OUTPUT -Value "DeliveryTargetsJson=$deliveryTargetsJson"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "DeliveryTargetsJson=$deliveryTargetsJson"
Write-Host "DeliveryTargetsJson=$deliveryTargetsJson"
Add-Content -Path $env:GITHUB_OUTPUT -Value "DeliveryTargetCount=$($deliveryTargets.Count)"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "DeliveryTargetCount=$($deliveryTargets.Count)"
Write-Host "DeliveryTargetCount=$($deliveryTargets.Count)"
Add-Content -Path $env:GITHUB_ENV -Value "DeliveryTargets=$deliveryTargetsJson"
Add-Content -Encoding UTF8 -Path $env:GITHUB_ENV -Value "DeliveryTargets=$deliveryTargetsJson"
CheckForUpdates:
runs-on: [ windows-latest ]
Expand Down Expand Up @@ -217,7 +217,7 @@ jobs:
run: |
$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0
$envName = '${{ matrix.environment }}'.split(' ')[0]
Add-Content -Path $env:GITHUB_OUTPUT -Value "envName=$envName"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "envName=$envName"
- name: Read settings
uses: microsoft/AL-Go-Actions/ReadSettings@main
Expand Down Expand Up @@ -298,12 +298,12 @@ jobs:
$projects = ($projects.Split(',') | Where-Object { $buildProjects -contains $_ }) -join ','
}
Add-Content -Path $env:GITHUB_OUTPUT -Value "authContext=$authContext"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "authContext=$authContext"
Write-Host "authContext=$authContext"
Add-Content -Path $env:GITHUB_OUTPUT -Value "environmentName=$environmentName"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "environmentName=$environmentName"
Write-Host "environmentName=$([System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($environmentName)))"
Write-Host "environmentName (as Base64)=$environmentName"
Add-Content -Path $env:GITHUB_OUTPUT -Value "projects=$projects"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "projects=$projects"
Write-Host "projects=$projects"
- name: Deploy
Expand Down Expand Up @@ -355,7 +355,7 @@ jobs:
$errorActionPreference = "Stop"; $ProgressPreference = "SilentlyContinue"; Set-StrictMode -Version 2.0
$contextName = '${{ matrix.deliveryTarget }}Context'
$deliveryContext = [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String([System.Environment]::GetEnvironmentVariable($contextName)))
Add-Content -Path $env:GITHUB_OUTPUT -Value "deliveryContext=$deliveryContext"
Add-Content -Encoding UTF8 -Path $env:GITHUB_OUTPUT -Value "deliveryContext=$deliveryContext"
Write-Host "deliveryContext=$deliveryContext"
- name: Deliver
Expand Down
Loading

0 comments on commit 7c65dae

Please sign in to comment.