Amadevus / pwsh-script

GitHub Action to run PowerShell scripts in a rich, prepared scope - inspired by actions/github-script.
MIT License
47 stars 8 forks source link

Demo #2

Open amis92 opened 4 years ago

amis92 commented 4 years ago

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. :)

github-actions[bot] commented 1 year ago

result output:

error output:

bala503 commented 1 year ago

/demo get-date Workflow run

github-actions[bot] commented 1 year ago

result output:

"2023-08-21T18:17:56.2955327+00:00"

error output:

NJullienSweet commented 12 months ago

/demo

Get-Location
New-Item -ItemType Directory test
Set-Location test
Get-Location
Write-Host "$GITHUB_WORKSPACE"

Workflow run

NJullienSweet commented 12 months ago

Apparently the demo action is broken, sorry for that. 🫥

ssg-randy-knight commented 10 months ago

/demo

echo "Hello World" Workflow run

github-actions[bot] commented 10 months ago

result output:

Hello World

error output:

MagnusMight commented 10 months ago

/demo

return (1 + 1)

Workflow run

github-actions[bot] commented 10 months ago

result output:

2

error output: