Skip to content

Commit c9175ba

Browse files
committed
chore: replace deprecated GH set-output
1 parent 46fe875 commit c9175ba

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

.github/workflows/updater.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,14 @@ jobs:
129129
run: |
130130
$mainBranch = $(git remote show origin | Select-String "HEAD branch: (.*)").Matches[0].Groups[1].Value
131131
Write-Host '::echo::on'
132-
Write-Host "::set-output name=baseBranch::$mainBranch"
132+
"baseBranch=$mainBranch" >> $env:GITHUB_OUTPUT
133133
$prBranch = switch ('${{ inputs.pr-strategy }}')
134134
{
135135
'create' { 'deps/${{ inputs.path }}/${{ steps.target.outputs.latestTag }}' }
136136
'update' { 'deps/${{ inputs.path }}' }
137137
default { throw "Unkown PR strategy '${{ inputs.pr-strategy }}'." }
138138
}
139-
Write-Host "::set-output name=prBranch::$prBranch"
139+
"prBranch=$prBranch" >> $env:GITHUB_OUTPUT
140140
141141
- name: Fetch an existing PR
142142
if: steps.target.outputs.latestTag != steps.target.outputs.originalTag
@@ -162,12 +162,12 @@ jobs:
162162
Write-Host '::echo::on'
163163
if ($prCount -eq '0')
164164
{
165-
Write-Host "::set-output name=url::"
165+
"url=" >> $env:GITHUB_OUTPUT
166166
}
167167
elseif ($prCount -eq '1')
168168
{
169169
$url = $($data | Select-String '"html_url": +"(.*/pull/.*)"').Matches[0].Groups[1].Value
170-
Write-Host "::set-output name=url::$url"
170+
"url=$url" >> $env:GITHUB_OUTPUT
171171
}
172172
else
173173
{
@@ -212,11 +212,11 @@ jobs:
212212
Write-Host '::echo::on'
213213
if ('${{ steps.create-pr.outputs.pull-request-url }}' -ne '')
214214
{
215-
Write-Host "::set-output name=url::${{ steps.create-pr.outputs.pull-request-url }}"
215+
"url=${{ steps.create-pr.outputs.pull-request-url }}" >> $env:GITHUB_OUTPUT
216216
}
217217
elseif ('${{ steps.existing-pr.outputs.url }}' -ne '')
218218
{
219-
Write-Host "::set-output name=url::${{ steps.existing-pr.outputs.url }}"
219+
"url=${{ steps.existing-pr.outputs.url }}" >> $env:GITHUB_OUTPUT
220220
}
221221
else
222222
{

updater/scripts/update-dependency.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ if ("$Tag" -eq "")
134134
$latestTagNice = ($latestTag -match "^[0-9]") ? "v$latestTag" : $latestTag
135135

136136
Write-Host '::echo::on'
137-
Write-Host "::set-output name=originalTag::$originalTag"
138-
Write-Host "::set-output name=latestTag::$latestTag"
139-
Write-Host "::set-output name=latestTagNice::$latestTagNice"
140-
Write-Host "::set-output name=url::$url"
141-
Write-Host "::set-output name=mainBranch::$mainBranch"
137+
"originalTag=$originalTag" >> $env:GITHUB_OUTPUT
138+
"latestTag=$latestTag" >> $env:GITHUB_OUTPUT
139+
"latestTagNice=$latestTagNice" >> $env:GITHUB_OUTPUT
140+
"url=$url" >> $env:GITHUB_OUTPUT
141+
"mainBranch=$mainBranch" >> $env:GITHUB_OUTPUT
142142

143143
if ("$originalTag" -eq "$latestTag")
144144
{

0 commit comments

Comments
 (0)