generated from PSModule/Template-Action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
82 lines (79 loc) · 2.74 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: GitHub-Script (by PSModule)
description: A GitHub Action used for running a PowerShell script that uses the GitHub PowerShell module
author: PSModule
branding:
icon: upload-cloud
color: white
inputs:
Script:
description: The script to run. Can be inline, multi-line or a path to a script file.
required: false
Token:
description: Log in using an Installation Access Token (IAT).
required: false
default: ${{ github.token }}
ClientID:
description: Log in using a GitHub App, using the App's Client ID and Private Key.
required: false
PrivateKey:
description: Log in using a GitHub App, using the App's Client ID and Private Key.
required: false
Debug:
description: Enable debug output.
required: false
default: 'false'
Verbose:
description: Enable verbose output.
required: false
default: 'false'
Version:
description: Specifies the version of the GitHub module to be installed. The value must be an exact version.
required: false
Prerelease:
description: Allow prerelease versions if available.
required: false
default: 'false'
ShowInfo:
description: Show information about the environment.
required: false
default: 'true'
ShowInit:
description: Show information about the initialization.
required: false
default: 'false'
ShowOutput:
description: Show the output of the script.
required: false
default: 'false'
WorkingDirectory:
description: The working directory where the script will run from.
required: false
default: ${{ github.workspace }}
outputs:
result:
description: The output of the script as a JSON object. To add outputs to `result`, use `Set-GitHubOutput`.
value: ${{ steps.RunGitHubScript.outputs.result }}
runs:
using: composite
steps:
- name: Install GitHub
shell: pwsh
id: RunGitHubScript
working-directory: ${{ inputs.WorkingDirectory }}
env:
GITHUB_ACTION_INPUT_Token: ${{ inputs.Token }}
GITHUB_ACTION_INPUT_ClientID: ${{ inputs.ClientID }}
GITHUB_ACTION_INPUT_PrivateKey: ${{ inputs.PrivateKey }}
GITHUB_ACTION_INPUT_Debug: ${{ inputs.Debug }}
GITHUB_ACTION_INPUT_Verbose: ${{ inputs.Verbose }}
GITHUB_ACTION_INPUT_Version: ${{ inputs.Version }}
GITHUB_ACTION_INPUT_ShowInit: ${{ inputs.ShowInit }}
GITHUB_ACTION_INPUT_ShowInfo: ${{ inputs.ShowInfo }}
GITHUB_ACTION_INPUT_ShowOutput: ${{ inputs.ShowOutput }}
GITHUB_ACTION_INPUT_Prerelease: ${{ inputs.Prerelease }}
run: |
# GitHub-Script
. ${{ github.action_path }}\scripts\init.ps1
. ${{ github.action_path }}\scripts\info.ps1
${{ inputs.Script }}
. ${{ github.action_path }}\scripts\outputs.ps1