pwsh-script
pwsh-script copied to clipboard
Demo
There's a slash-command available to try out the action. Simply comment on this issue with /demo
in the first line and a PowerShell script in the following lines. If your comment will contain a code-block (fenced or not), contents of it will be executed instead of whole comment body - and it'll look better! :)
For example, comment with:
/demo
```powershell
return (1 + 1)
```
You should get a result (and/or an error) in a comment that will follow.
ℹ Please note, for security
$github.token
is not available in the demo script. It's available all right in normal action executions. :)
result
output:
2
error
output:
result
output:
2
error
output:
result
output:
[
"Amadevus/pwsh-script",
"changed"
]
error
output:
result
output:
amis92
error
output:
result
output:
/home/runner/work/pwsh-script/pwsh-script
error
output:
result
output:
"2021-07-13T05:36:32.3956555+00:00"
error
output:
result
output:
error
output:
result
output:
2
error
output:
/demo Write-Output 'Hi' Workflow run
result
output:
Hi
error
output:
result
output:
error
output:
/demo Workflow run
result
output:
error
output:
result
output:
error
output:
The term 'Set-Culture' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
result
output:
error
output:
The term 'Set-Culture' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
result
output:
2
error
output:
result
output:
error
output: