-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yaml
More file actions
70 lines (67 loc) · 2.56 KB
/
Copy pathaction.yaml
File metadata and controls
70 lines (67 loc) · 2.56 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Setup Database Client
description: Automate setting up a database client using querydesk.com so your team has instant access for debugging and testing.
branding:
icon: database
color: blue
inputs:
api-key:
description: API key from settings on https://app.querydesk.com
required: true
id:
description: The id to assign to this database connection. The same id must be passed in subsequent requests to update/delete this connection.
required: true
name:
description: The name for users to use to identity the database.
required: true
hostname:
description: The hostname for connecting to the database, either an ip or url.
required: true
database:
description: The name of the database to connect on.
required: true
adapter:
description: The adapter to use to establish the connection. Currently only `postgres` and `mysql` are supported, but sql server is on the roadmap.
required: true
username:
description: The username to authenticate with.
required: true
password:
description: The password to authenticate with.
required: true
agent-id:
description: The id of the agent this database should use to connect
ssl:
description: Set to `enabled` to turn on ssl connections for this database.
ssl_ca_cert:
description: The server ca cert to use with ssl connections, `ssl` must be set to `enabled`.
ssl_key:
description: The client key to use with ssl connections, `ssl` must be set to `enabled`.
ssl_cert:
description: The client cert to use with ssl connections, `ssl` must be set to `enabled`.
host:
description: The host to make the api call to.
default: api.querydesk.com
runs:
using: composite
steps:
- name: Setup Database Client
shell: bash
run: |
curl -X PUT https://${{ inputs.host }}/v1/databases/new \
-H "content-type: application/json" \
-H "x-api-key: ${{ inputs.api-key }}" \
--fail \
-d '{
"id": "${{ inputs.id }}",
"name": "${{ inputs.name }}",
"hostname": "${{ inputs.hostname }}",
"database": "${{ inputs.database }}",
"adapter": "${{ inputs.adapter }}",
"username": "${{ inputs.username }}",
"password": "${{ inputs.password }}",
"agent_id": "${{ inputs.agent-id }}",
"ssl": "${{ inputs.ssl }}",
"ssl_ca_cert": "${{ inputs.ssl_ca_cert }}",
"ssl_key": "${{ inputs.ssl_key }}",
"ssl_cert": "${{ inputs.ssl_cert }}"
}'