forked from Amadevus/pwsh-script
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
33 lines (33 loc) · 1.05 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: PowerShell script
author: Amadevus
description: >
Run PowerShell scripts within a hydrated context,
with workflow-command cmdlets; inspired by actions/github-script.
inputs:
script:
description: PowerShell script to execute in Actions-hydrated context
required: true
outputs:
result:
description: Return value of script execution
value: ${{ steps.script.outputs.result }}
error:
description: Exception details, if any was thrown during script execution.
value: ${{ steps.script.outputs.error }}
runs:
using: composite
steps:
- run: ${{ github.action_path }}/action.ps1
id: script
shell: pwsh
env:
TEMP: ${{ runner.temp }}
PWSH_SCRIPT_ACTION_TEXT: ${{ inputs.script }}
PWSH_SCRIPT_ACTION_GITHUB: ${{ toJson(github) }}
PWSH_SCRIPT_ACTION_JOB: ${{ toJson(job) }}
PWSH_SCRIPT_ACTION_RUNNER: ${{ toJson(runner) }}
PWSH_SCRIPT_ACTION_STRATEGY: ${{ toJson(strategy) }}
PWSH_SCRIPT_ACTION_MATRIX: ${{ toJson(matrix) }}
branding:
icon: terminal
color: blue