generated from im-open/composite-action-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
54 lines (49 loc) · 2.09 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
name: 'Register Windows Service'
description: 'This action registers a windows service on a remote windows machine.'
inputs:
service-name:
description: The name of the Windows service to register
required: true
deployment-path:
description: The local path on the remote machine to the service executable, i.e. c:\service_directory\service.exe
required: true
server:
description: 'The name of the target server, i.e. machine.domain.com or 10.10.10.1'
required: true
run-time-id:
description: 'The run-time service credential user id, i.e. "domain\user_id", defaults to "NT AUTHORITY\LOCAL SYSTEM"'
required: false
default: 'NT AUTHORITY\LOCAL SYSTEM'
run-time-secret:
description: 'The run-time service credential secret, this can be omitted if local system account is going to be used'
required: false
default: "THIS_WON'T_GET_USED"
deployment-id:
description: 'The deployment service account id to log into the server to register the service'
required: true
deployment-secret:
description: 'The deployment service account secret to log into the server to register the service'
required: true
runs:
using: 'composite'
steps:
- name: Action
id: action
shell: powershell
run: |
$run_time_secret_string = @'
${{ inputs.run-time-secret }}
'@
$run_time_secret_secure_string = ConvertTo-SecureString -String $run_time_secret_string -AsPlainText -Force
$deployment_secret_string = @'
${{ inputs.deployment-secret }}
'@
$deployment_secret_secure_string = ConvertTo-SecureString -String $deployment_secret_string -AsPlainText -Force
${{ github.action_path }}/register_service.ps1 `
-service_name '${{ inputs.service-name }}' `
-deployment_path '${{ inputs.deployment-path }}' `
-server '${{ inputs.server }}' `
-run_time_id '${{ inputs.run-time-id }}' `
-run_time_secret $run_time_secret_secure_string `
-deployment_id '${{ inputs.deployment-id }}' `
-deployment_secret $deployment_secret_secure_string