generated from im-open/composite-action-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
action.yml
48 lines (45 loc) · 1.71 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
name: 'Deploy Windows files'
description: 'This action deploys files to a windows machine.'
inputs:
server:
description: 'The name of the target server'
required: true
service-account-id:
description: 'The service account name'
required: true
service-account-password:
description: 'The service account password'
required: true
source-zip-file-path:
description: 'The path to the zip file that contains the application files'
required: true
deployment-folder-path:
description: 'The path to deploy the application files to'
required: true
clean-deployment-folder:
description: 'Remove files that are not in the source zip file, accepts values of true or false'
required: false
default: 'false'
exclude-from-purge:
description: 'Comma separated list of folders or files to leave when the deployment folder is purged'
required: false
default: ''
runs:
using: 'composite'
steps:
- name: Action
shell: powershell
run: |
$password_string = @'
${{ inputs.service-account-password }}
'@
$secure_password = ConvertTo-SecureString -String $password_string -AsPlainText -Force
$clean_target = '${{ inputs.clean-deployment-folder }}'.ToLower() -eq 'true'
${{ github.action_path }}/deploy_windows_files.ps1 `
-server '${{ inputs.server }}' `
-user_id '${{ inputs.service-account-id }}' `
-password $secure_password `
-source_zip_file_path '${{ inputs.source-zip-file-path }}' `
-exclude_from_purge: '${{ inputs.exclude-from-purge }}' `
-deployment_folder_path '${{ inputs.deployment-folder-path }}' `
-clean_deployment_folder $clean_target