-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
50 lines (49 loc) · 1.47 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
name: 'ntd - create a dynamodb table'
description: 'ntd - create a dynamodb table'
inputs:
aws_access_key_id:
description: 'AWS Access Key'
required: true
aws_secret_access_key:
description: 'AWS Secret Key'
required: true
aws_region:
description: 'AWS Region'
required: true
table_name:
description: 'Table name'
required: true
field_name:
description: 'Field name'
required: false
default: 'LockID'
reads:
description: 'Read throughput'
required: false
default: "1"
writes:
description: 'Write throughput'
required: false
default: "1"
runs:
using: "composite"
steps:
- name: Initial AWS Account
uses: aws-actions/configure-aws-credentials@master
with:
aws-access-key-id: ${{ inputs.aws_access_key_id }}
aws-secret-access-key: ${{ inputs.aws_secret_access_key }}
aws-region: ${{ inputs.aws_region }}
mask-aws-account-id: true
- name: Create a table
shell: bash
env:
TABLE_NAME: ${{ inputs.table_name }}
FIELD_NAME: ${{ inputs.field_name }}
READS: ${{ inputs.reads }}
WRITES: ${{ inputs.writes }}
run: |
aws dynamodb create-table --table-name ${TABLE_NAME} --attribute-definitions AttributeName=${FIELD_NAME},AttributeType=S --key-schema AttributeName=${FIELD_NAME},KeyType=HASH --provisioned-throughput ReadCapacityUnits=${READS},WriteCapacityUnits=${WRITES}
branding:
icon: arrow-up-circle
color: blue