Skip to content

Commit

Permalink
Replace set-output for setting variables with pipe to GITHUB_OUTPUT
Browse files Browse the repository at this point in the history
  • Loading branch information
mjbond-msft committed Jul 1, 2024
1 parent 002eedd commit 1180b82
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/backport-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ jobs:
steps:
- name: Parse Comment
id: parse_comment
shell: pwsh
run: |
Write-Host "Parsing $env:COMMENT"
($botName, $backport, $backportTargetBranch) = [System.Text.RegularExpressions.Regex]::Split("$env:COMMENT", "\s+")
echo "::set-output name=target_branch::$backportTargetBranch"
shell: pwsh
Write-Host "GITHUB_OUTPUT: ${env:GITHUB_OUTPUT}"
[IO.File]::AppendAllText($env:GITHUB_OUTPUT, "target_branch=${backportTargetBranch}$([Environment]::NewLine)") # Equivalent to the deprecated ::set-output command: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idoutputs
env:
COMMENT: "${{ github.event.comment.body }}"

Expand Down

0 comments on commit 1180b82

Please sign in to comment.