-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
50 lines (45 loc) · 2.29 KB
/
action.yml
File metadata and controls
50 lines (45 loc) · 2.29 KB
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
name: Install and Run Depenedency Scripts
description: Downloads database dependency scripts and runs them against the specified database
inputs:
db-server-name:
description: The server where the dependency files will be run.
required: true
db-name:
description: The name of the database where the dependency files will run.
required: true
dependency-list:
description: A json string containing a list of objects with the name of the dependency package, the version,the url where the package is stored, and optionally the auth token needed to download the package.
required: true
use-integrated-security:
description: Use domain integrated security. If false, a db-username and db-password should be specified. If true, those parameters will be ignored if specified.
required: true
default: 'false'
db-username:
description: The username to use to login to the database. This is required if use-integrated-security is false, otherwise it's optional and will be ignored.
required: false
db-password:
description: The password for the user logging in to the database. This is required if use-integrated-security is false, otherwise it's optional and will be ignored.
required: false
trust-server-certificate:
description: A boolean that controls whether or not to validate the SQL Server TLS certificate.
required: false
default: 'false'
runs:
using: 'composite'
steps:
- name: Install DB Dependencies
shell: pwsh
run: |
$parsedDependencies = ConvertFrom-Json "${{ inputs.dependency-list }}"
${{ github.action_path }}\src\download-db-dependencies.ps1 -dependencies $parsedDependencies
- name: Run DB Dependencies
shell: pwsh
run: |
[System.Security.SecureString] $securePassword = if(!!"${{ inputs.db-password }}") { ConvertTo-SecureString "${{ inputs.password }}" -AsPlainText -Force } else { $null }
${{ github.action_path }}\src\run-db-dependencies.ps1 `
-dbServer "${{ inputs.db-server-name }}" `
-dbName "${{ inputs.db-name }}" `
-useIntegratedSecurity:$${{ inputs.use-integrated-security }} `
-username "${{ inputs.db-username }}" `
-password $securePassword `
-trustServerCertificate:$${{ inputs.trust-server-certificate }}