Skip to content

Commit

Permalink
Fix Github Output On Windows (#207)
Browse files Browse the repository at this point in the history
* Fix github output variable for windows workflows
  • Loading branch information
AndrewKahr authored Apr 12, 2023
1 parent 2345c23 commit f37267a
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 50 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/new-windows-base-image-requested.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@ jobs:
if ("${{ github.event.inputs.jobId }}")
{
# Workflow Dispatch
echo "jobId=${{ github.event.inputs.jobId }}" >> $GITHUB_OUTPUT
echo "repoVersionFull=${{ github.event.inputs.repoVersionFull }}" >> $GITHUB_OUTPUT
echo "repoVersionMinor=${{ github.event.inputs.repoVersionMinor }}" >> $GITHUB_OUTPUT
echo "repoVersionMajor=${{ github.event.inputs.repoVersionMajor }}" >> $GITHUB_OUTPUT
echo "jobId=${{ github.event.inputs.jobId }}" >> $Env:GITHUB_OUTPUT
echo "repoVersionFull=${{ github.event.inputs.repoVersionFull }}" >> $Env:GITHUB_OUTPUT
echo "repoVersionMinor=${{ github.event.inputs.repoVersionMinor }}" >> $Env:GITHUB_OUTPUT
echo "repoVersionMajor=${{ github.event.inputs.repoVersionMajor }}" >> $Env:GITHUB_OUTPUT
} else
{
# Repo Dispatch
echo "jobId=${{ github.event.client_payload.jobId }}" >> $GITHUB_OUTPUT
echo "repoVersionFull=${{ github.event.client_payload.repoVersionFull }}" >> $GITHUB_OUTPUT
echo "repoVersionMinor=${{ github.event.client_payload.repoVersionMinor }}" >> $GITHUB_OUTPUT
echo "repoVersionMajor=${{ github.event.client_payload.repoVersionMajor }}" >> $GITHUB_OUTPUT
echo "jobId=${{ github.event.client_payload.jobId }}" >> $Env:GITHUB_OUTPUT
echo "repoVersionFull=${{ github.event.client_payload.repoVersionFull }}" >> $Env:GITHUB_OUTPUT
echo "repoVersionMinor=${{ github.event.client_payload.repoVersionMinor }}" >> $Env:GITHUB_OUTPUT
echo "repoVersionMajor=${{ github.event.client_payload.repoVersionMajor }}" >> $Env:GITHUB_OUTPUT
}
- name: Show hook input
Expand Down Expand Up @@ -132,8 +132,8 @@ jobs:
$MetaData = docker inspect unityci/base:windows-${{ steps.buildParameters.outputs.repoVersionFull }}
$ImageDetails = $MetaData | ConvertFrom-Json
$Digest = $ImageDetails.Config.Image
echo "digest=$Digest" >> $GITHUB_OUTPUT
echo "metadata=$MetaData" >> $GITHUB_OUTPUT
echo "digest=$Digest" >> $Env:GITHUB_OUTPUT
echo "metadata=$MetaData" >> $Env:GITHUB_OUTPUT
- name: Inspect
run: |
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/new-windows-hub-image-requested.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@ jobs:
if ("${{ github.event.inputs.jobId }}")
{
# Workflow Dispatch
echo "jobId={{ github.event.inputs.jobId }}" >> $GITHUB_OUTPUT
echo "repoVersionFull={{ github.event.inputs.repoVersionFull }}" >> $GITHUB_OUTPUT
echo "repoVersionMinor={{ github.event.inputs.repoVersionMinor }}" >> $GITHUB_OUTPUT
echo "repoVersionMajor={{ github.event.inputs.repoVersionMajor }}" >> $GITHUB_OUTPUT
echo "jobId={{ github.event.inputs.jobId }}" >> $Env:GITHUB_OUTPUT
echo "repoVersionFull={{ github.event.inputs.repoVersionFull }}" >> $Env:GITHUB_OUTPUT
echo "repoVersionMinor={{ github.event.inputs.repoVersionMinor }}" >> $Env:GITHUB_OUTPUT
echo "repoVersionMajor={{ github.event.inputs.repoVersionMajor }}" >> $Env:GITHUB_OUTPUT
} else
{
# Repo Dispatch
echo "jobId=${{ github.event.client_payload.jobId }}" >> $GITHUB_OUTPUT
echo "repoVersionFull=${{ github.event.client_payload.repoVersionFull }}" >> $GITHUB_OUTPUT
echo "repoVersionMinor=${{ github.event.client_payload.repoVersionMinor }}" >> $GITHUB_OUTPUT
echo "repoVersionMajor=${{ github.event.client_payload.repoVersionMajor }}" >> $GITHUB_OUTPUT
echo "jobId=${{ github.event.client_payload.jobId }}" >> $Env:GITHUB_OUTPUT
echo "repoVersionFull=${{ github.event.client_payload.repoVersionFull }}" >> $Env:GITHUB_OUTPUT
echo "repoVersionMinor=${{ github.event.client_payload.repoVersionMinor }}" >> $Env:GITHUB_OUTPUT
echo "repoVersionMajor=${{ github.event.client_payload.repoVersionMajor }}" >> $Env:GITHUB_OUTPUT
}
- name: Show hook input
Expand Down Expand Up @@ -139,8 +139,8 @@ jobs:
$MetaData = docker inspect unityci/hub:windows-${{ steps.buildParameters.outputs.repoVersionFull }}
$ImageDetails = $MetaData | ConvertFrom-Json
$Digest = $ImageDetails.Config.Image
echo "digest=$Digest" >> $GITHUB_OUTPUT
echo "metadata=$MetaData" >> $GITHUB_OUTPUT
echo "digest=$Digest" >> $Env:GITHUB_OUTPUT
echo "metadata=$MetaData" >> $Env:GITHUB_OUTPUT
- name: Inspect
run: |
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/new-windows-legacy-editor-image-requested.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,21 @@ jobs:
if ("${{ github.event.inputs.jobId }}")
{
# Workflow Dispatch
echo "jobId=${{ github.event.inputs.jobId }}" >> $GITHUB_OUTPUT
echo "editorVersion=${{ github.event.inputs.editorVersion }}" >> $GITHUB_OUTPUT
echo "changeSet=${{ github.event.inputs.changeSet }}" >> $GITHUB_OUTPUT
echo "repoVersionFull=${{ github.event.inputs.repoVersionFull }}" >> $GITHUB_OUTPUT
echo "repoVersionMinor=${{ github.event.inputs.repoVersionMinor }}" >> $GITHUB_OUTPUT
echo "repoVersionMajor=${{ github.event.inputs.repoVersionMajor }}" >> $GITHUB_OUTPUT
echo "jobId=${{ github.event.inputs.jobId }}" >> $Env:GITHUB_OUTPUT
echo "editorVersion=${{ github.event.inputs.editorVersion }}" >> $Env:GITHUB_OUTPUT
echo "changeSet=${{ github.event.inputs.changeSet }}" >> $Env:GITHUB_OUTPUT
echo "repoVersionFull=${{ github.event.inputs.repoVersionFull }}" >> $Env:GITHUB_OUTPUT
echo "repoVersionMinor=${{ github.event.inputs.repoVersionMinor }}" >> $Env:GITHUB_OUTPUT
echo "repoVersionMajor=${{ github.event.inputs.repoVersionMajor }}" >> $Env:GITHUB_OUTPUT
} else
{
# Repo Dispatch
echo "jobId=${{ github.event.client_payload.jobId }}" >> $GITHUB_OUTPUT
echo "editorVersion=${{ github.event.client_payload.editorVersion }}" >> $GITHUB_OUTPUT
echo "changeSet=${{ github.event.client_payload.changeSet }}" >> $GITHUB_OUTPUT
echo "repoVersionFull=${{ github.event.client_payload.repoVersionFull }}" >> $GITHUB_OUTPUT
echo "repoVersionMinor=${{ github.event.client_payload.repoVersionMinor }}" >> $GITHUB_OUTPUT
echo "repoVersionMajor=${{ github.event.client_payload.repoVersionMajor }}" >> $GITHUB_OUTPUT
echo "jobId=${{ github.event.client_payload.jobId }}" >> $Env:GITHUB_OUTPUT
echo "editorVersion=${{ github.event.client_payload.editorVersion }}" >> $Env:GITHUB_OUTPUT
echo "changeSet=${{ github.event.client_payload.changeSet }}" >> $Env:GITHUB_OUTPUT
echo "repoVersionFull=${{ github.event.client_payload.repoVersionFull }}" >> $Env:GITHUB_OUTPUT
echo "repoVersionMinor=${{ github.event.client_payload.repoVersionMinor }}" >> $Env:GITHUB_OUTPUT
echo "repoVersionMajor=${{ github.event.client_payload.repoVersionMajor }}" >> $Env:GITHUB_OUTPUT
}
- name: Show hook input
Expand Down Expand Up @@ -211,8 +211,8 @@ jobs:
$MetaData = docker inspect unityci/editor:windows-${{ steps.buildParameters.outputs.editorVersion }}-${{ matrix.targetPlatform }}-${{ steps.buildParameters.outputs.repoVersionFull }}
$ImageDetails = $MetaData | ConvertFrom-Json
$Digest = $ImageDetails.Config.Image
echo "digest=$Digest" >> $GITHUB_OUTPUT
echo "metadata=$MetaData" >> $GITHUB_OUTPUT
echo "digest=$Digest" >> $Env:GITHUB_OUTPUT
echo "metadata=$MetaData" >> $Env:GITHUB_OUTPUT
#################
# reporting #
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,21 @@ jobs:
if ("${{ github.event.inputs.jobId }}")
{
# Workflow Dispatch
echo "jobId=${{ github.event.inputs.jobId }}" >> $GITHUB_OUTPUT
echo "editorVersion=${{ github.event.inputs.editorVersion }}" >> $GITHUB_OUTPUT
echo "changeSet=${{ github.event.inputs.changeSet }}" >> $GITHUB_OUTPUT
echo "repoVersionFull=${{ github.event.inputs.repoVersionFull }}" >> $GITHUB_OUTPUT
echo "repoVersionMinor=${{ github.event.inputs.repoVersionMinor }}" >> $GITHUB_OUTPUT
echo "repoVersionMajor=${{ github.event.inputs.repoVersionMajor }}" >> $GITHUB_OUTPUT
echo "jobId=${{ github.event.inputs.jobId }}" >> $Env:GITHUB_OUTPUT
echo "editorVersion=${{ github.event.inputs.editorVersion }}" >> $Env:GITHUB_OUTPUT
echo "changeSet=${{ github.event.inputs.changeSet }}" >> $Env:GITHUB_OUTPUT
echo "repoVersionFull=${{ github.event.inputs.repoVersionFull }}" >> $Env:GITHUB_OUTPUT
echo "repoVersionMinor=${{ github.event.inputs.repoVersionMinor }}" >> $Env:GITHUB_OUTPUT
echo "repoVersionMajor=${{ github.event.inputs.repoVersionMajor }}" >> $Env:GITHUB_OUTPUT
} else
{
# Repo Dispatch
echo "jobId=${{ github.event.client_payload.jobId }}" >> $GITHUB_OUTPUT
echo "editorVersion=${{ github.event.client_payload.editorVersion }}" >> $GITHUB_OUTPUT
echo "changeSet=${{ github.event.client_payload.changeSet }}" >> $GITHUB_OUTPUT
echo "repoVersionFull=${{ github.event.client_payload.repoVersionFull }}" >> $GITHUB_OUTPUT
echo "repoVersionMinor=${{ github.event.client_payload.repoVersionMinor }}" >> $GITHUB_OUTPUT
echo "repoVersionMajor=${{ github.event.client_payload.repoVersionMajor }}" >> $GITHUB_OUTPUT
echo "jobId=${{ github.event.client_payload.jobId }}" >> $Env:GITHUB_OUTPUT
echo "editorVersion=${{ github.event.client_payload.editorVersion }}" >> $Env:GITHUB_OUTPUT
echo "changeSet=${{ github.event.client_payload.changeSet }}" >> $Env:GITHUB_OUTPUT
echo "repoVersionFull=${{ github.event.client_payload.repoVersionFull }}" >> $Env:GITHUB_OUTPUT
echo "repoVersionMinor=${{ github.event.client_payload.repoVersionMinor }}" >> $Env:GITHUB_OUTPUT
echo "repoVersionMajor=${{ github.event.client_payload.repoVersionMajor }}" >> $Env:GITHUB_OUTPUT
}
- name: Show hook input
Expand Down Expand Up @@ -211,8 +211,8 @@ jobs:
$MetaData = docker inspect unityci/editor:windows-${{ steps.buildParameters.outputs.editorVersion }}-${{ matrix.targetPlatform }}-${{ steps.buildParameters.outputs.repoVersionFull }}
$ImageDetails = $MetaData | ConvertFrom-Json
$Digest = $ImageDetails.Config.Image
echo "digest=$Digest" >> $GITHUB_OUTPUT
echo "metadata=$MetaData" >> $GITHUB_OUTPUT
echo "digest=$Digest" >> $Env:GITHUB_OUTPUT
echo "metadata=$MetaData" >> $Env:GITHUB_OUTPUT
#################
# reporting #
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/retry-windows-editor-image-requested.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ jobs:
$MetaData = docker inspect unityci/editor:windows-${{ github.event.client_payload.editorVersion }}-${{ github.event.client_payload.targetPlatform }}-${{ github.event.client_payload.repoVersionFull }}
$ImageDetails = $MetaData | ConvertFrom-Json
$Digest = $ImageDetails.Config.Image
echo "digest=$Digest" >> $GITHUB_OUTPUT
echo "metadata=$MetaData" >> $GITHUB_OUTPUT
echo "digest=$Digest" >> $Env:GITHUB_OUTPUT
echo "metadata=$MetaData" >> $Env:GITHUB_OUTPUT
#################
# reporting #
Expand Down

0 comments on commit f37267a

Please sign in to comment.