Skip to content

Commit 22c002d

Browse files
committed
Parametrize node-increase-disk.
1 parent d090774 commit 22c002d

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

.github/workflows/node-increase-disk.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ on:
1818
description: "The amount of diskspace to add (GB)"
1919
default: "50"
2020
required: true
21+
disk:
22+
description: "The disk to increase using growpart (e.g., /dev/xvda)"
23+
default: "/dev/xvda"
24+
required: true
25+
partition_number:
26+
description: "The partition number to extend using growpart (e.g., 1)"
27+
default: "1"
28+
required: true
29+
partition_device:
30+
description: "The partition device to extend using resize2fs (e.g., /dev/xvda1)"
31+
default: "/dev/xvda1"
32+
required: true
2133

2234

2335
jobs:
@@ -79,7 +91,12 @@ jobs:
7991
[{"Key":"InstanceIds","Values":["${{ inputs.instance_id }}"]}]
8092
document-name: AWS-RunShellScript
8193
parameters: |
82-
{"commands":["sudo growpart /dev/xvda 1", "sudo resize2fs /dev/xvda1"]}
94+
{
95+
"commands":[
96+
"sudo growpart ${{ inputs.disk }} ${{ inputs.partition_number }}",
97+
"sudo resize2fs ${{ inputs.partition_device }}"
98+
]
99+
}
83100
84101
- name: Get SSM output
85102
if: always()

0 commit comments

Comments
 (0)