Skip to content

Test GITHUB_OUTPUT

Test GITHUB_OUTPUT #5

Workflow file for this run

name: Test GITHUB_OUTPUT
on:
workflow_dispatch:
jobs:
test-output:
runs-on: ubuntu-latest
steps:
- name: Set an output variable using PowerShell
id: set-output
run: |
$testOutput = "Hello, World!"
echo "testOutput=$testOutput" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8
shell: pwsh
- name: Use the output variable using PowerShell
run: |
$output = '${{ steps.set-output.outputs.testOutput }}'
Write-Host "The output variable value is: $output"
shell: pwsh