-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
52 lines (45 loc) · 1.25 KB
/
action.yml
File metadata and controls
52 lines (45 loc) · 1.25 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
51
52
name: 'SQL DB Test'
author: 'Tobias Biemann'
description: 'GitHub Action to test a MS SQL database'
branding:
icon: "database"
color: "blue"
inputs:
sql-sa-pw:
description: 'The password for the SQL-Server login name sa'
required: true
sqlpackage-path:
description: 'Absolute path to the folder of the dacpac-file'
required: false
default: ''
db-name:
description: 'Database name'
required: false
default: 'TestDB'
outputs:
package-file:
description: 'Absolute path to the used dacpac-file'
value: ${{ steps.inst-dac.outputs.FILE }}
runs:
using: "composite"
steps:
- name: Check Runner OS
shell: bash
if: ${{ runner.os != 'Linux' }}
run: |
echo "This action is only working on a linux runner!"
exit 1
- name: Initialize SQL-Server on Linux runner
shell: bash
run: ${{ github.action_path }}/dist/sql-init.sh
env:
SQLPW: ${{ inputs.sql-sa-pw }}
- name: Install DACPAC
shell: bash
if: ${{ inputs.sqlpackage-path != '' }}
id: inst-dac
run: ${{ github.action_path }}/dist/install-dacpac.sh
env:
SQLPW: ${{ inputs.sql-sa-pw }}
DACPATH: ${{ inputs.sqlpackage-path }}
DBNAME: ${{ inputs.db-name }}