This repository has been archived by the owner on Sep 8, 2023. It is now read-only.
generated from im-open/composite-action-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
88 lines (82 loc) · 3.21 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
83
84
85
86
87
88
name: 'IIS Service Action'
description: 'This action will create an IIS website on a target Windows Server'
inputs:
server:
description: 'The name of the target server'
required: true
website-name:
description: 'The name of the website'
required: true
app-pool-name:
description: 'The name of the app pool'
required: true
website-host-header:
description: 'The host-header the web site should respond to'
required: true
website-path:
description: 'The local directory location of the web site, i.e., "c:\inetpub\webapp"'
required: true
website-cert-path:
description: 'The private cert file path for site https binding'
default: ''
required: false
website-cert-friendly-name:
description: "The private cert's friendly name"
default: ''
required: false
website-cert-password:
description: "The private cert's file password"
default: ''
required: false
app-pool-service-account-id:
description: 'The service account name used for the operation of the web site'
required: false
app-pool-service-account-secret:
description: 'The service account secret used for the operation of the web site'
required: false
deployment-service-account-id:
description: 'The service account id used to create the IIS site'
required: true
deployment-service-account-secret:
description: 'The service account secret used to create the IIS site'
required: true
runs:
using: 'composite'
steps:
- name: Action
id: action
shell: powershell
run: |
$deployment_password_string = @'
${{ inputs.deployment-service-account-secret }}
'@
$secure_deployment_password = ConvertTo-SecureString -String $deployment_password_string -AsPlainText -Force
if('${{ inputs.website-cert-password }}'.Length -eq 0) {
$cert_password_string = 'none'
} else {
$cert_password_string = @'
${{ inputs.website-cert-password }}
'@
}
$secure_cert_password = ConvertTo-SecureString -String $cert_password_string -AsPlainText -Force
if('${{ inputs.app-pool-service-account-secret }}'.Length -eq 0){
$app_pool_password_string = @'
${{ inputs.app-pool-service-account-secret }}
'@
} else {
$app_pool_password_string = 'none'
}
$app_pool_password = ConvertTo-SecureString -String $app_pool_password_string -AsPlainText -Force
${{ github.action_path }}/iis_action.ps1 `
-server '${{ inputs.server }}' `
-website_name '${{ inputs.website-name }}' `
-app_pool_name '${{ inputs.app-pool-name }}' `
-website_host_header '${{ inputs.website-host-header }}' `
-website_path '${{ inputs.website-path }}' `
-website_cert_path '${{ inputs.website-cert-path }}' `
-website_cert_password $secure_cert_password `
-website_cert_friendly_name '${{ inputs.website-cert-friendly-name }}' `
-app_pool_user_id '${{ inputs.app-pool-service-account-id }}' `
-app_pool_user_secret $app_pool_password `
-deploy_user_id '${{ inputs.deployment-service-account-id }}' `
-deploy_user_secret $secure_deployment_password