Test GITHUB_OUTPUT #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |