Skip to content

Commit 6bf1bac

Browse files
committed
Revert "Add 'key-name' and 'block-device-mapping' options (machulav#156)"
This reverts commit 1449492.
1 parent 49cc9c6 commit 6bf1bac

File tree

5 files changed

+1
-26
lines changed

5 files changed

+1
-26
lines changed

README.md

+1-9
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,7 @@ Now you're ready to go!
206206
| `aws-resource-tags` | Optional. Used only with the `start` mode. | Specifies tags to add to the EC2 instance and any attached storage. <br><br> This field is a stringified JSON array of tag objects, each containing a `Key` and `Value` field (see example below). <br><br> Setting this requires additional AWS permissions for the role launching the instance (see above). |
207207
| `runner-home-dir` | Optional. Used only with the `start` mode. | Specifies a directory where pre-installed actions-runner software and scripts are located.<br><br> |
208208
| `pre-runner-script` | Optional. Used only with the `start` mode. | Specifies bash commands to run before the runner starts. It's useful for installing dependencies with apt-get, yum, dnf, etc. For example:<pre> - name: Start EC2 runner<br> with:<br> mode: start<br> ...<br> pre-runner-script: \|<br> sudo yum update -y && \ <br> sudo yum install docker git libicu -y<br> sudo systemctl enable docker</pre>
209-
`key-name` | Optional. Used only with the `start` mode. | Specifies SSH key-pair name to assign to an instance. This is useful for SSHing into an instance for debugging.<br><br> |
210-
| `block-device-mapping` | Optional. Used only with the `start` mode. | JSON string specifying the [BlockDeviceMapping](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-blockdev-mapping.html). For example:<pre> block-device-mapper: \|<br> [<br> {"DeviceName" : "/dev/sda1", "Ebs" : { "VolumeType": "gp2", "VolumeSize": 34 }},<br> {"DeviceName" : "/dev/sdb", "VirtualName": "ephemeral0" }<br> ]
211-
</pre>|
209+
<br><br> |
212210

213211
### Environment variables
214212

@@ -265,12 +263,6 @@ jobs:
265263
{"Key": "Name", "Value": "ec2-github-runner"},
266264
{"Key": "GitHubRepository", "Value": "${{ github.repository }}"}
267265
]
268-
key-name: my-ssh-key # optional
269-
block-device-mapper: | # optional
270-
[
271-
{"DeviceName" : "/dev/sda1", "Ebs" : { "VolumeType": "gp2", "VolumeSize": 34 }},
272-
{"DeviceName" : "/dev/sdb", "VirtualName": "ephemeral0" }
273-
]
274266
do-the-job:
275267
name: Do the job on the runner
276268
needs: start-runner # required to start the main job when the runner is ready

action.yml

-9
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,6 @@ inputs:
6969
description: >-
7070
Specifies bash commands to run before the runner starts. It's useful for installing dependencies with apt-get, yum, dnf, etc.
7171
required: false
72-
block-device-mapping:
73-
description: >-
74-
JSON string of EC2 BlockDeviceMapping (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-blockdev-mapping.html).
75-
required: false
76-
default: '[]'
77-
key-name:
78-
description: >-
79-
Assign SSH key-pair name to an instance. This can be useful for SSHing into an instance for debugging.
80-
required: false
8172

8273
outputs:
8374
label:

dist/index.js

-4
Original file line numberDiff line numberDiff line change
@@ -62847,8 +62847,6 @@ async function startEc2Instance(label, githubRegistrationToken) {
6284762847
SecurityGroupIds: [config.input.securityGroupId],
6284862848
IamInstanceProfile: { Name: config.input.iamRoleName },
6284962849
TagSpecifications: config.tagSpecifications,
62850-
BlockDeviceMappings: config.input.blockDeviceMappings,
62851-
KeyName: config.input.keyName,
6285262850
};
6285362851

6285462852
try {
@@ -62925,8 +62923,6 @@ class Config {
6292562923
iamRoleName: core.getInput('iam-role-name'),
6292662924
runnerHomeDir: core.getInput('runner-home-dir'),
6292762925
preRunnerScript: core.getInput('pre-runner-script'),
62928-
blockDeviceMappings: JSON.parse(core.getInput('block-device-mapping')),
62929-
keyName: core.getInput('key-name'),
6293062926
};
6293162927

6293262928
const tags = JSON.parse(core.getInput('aws-resource-tags'));

src/aws.js

-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ async function startEc2Instance(label, githubRegistrationToken) {
5050
SecurityGroupIds: [config.input.securityGroupId],
5151
IamInstanceProfile: { Name: config.input.iamRoleName },
5252
TagSpecifications: config.tagSpecifications,
53-
BlockDeviceMappings: config.input.blockDeviceMappings,
54-
KeyName: config.input.keyName,
5553
};
5654

5755
try {

src/config.js

-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ class Config {
1515
iamRoleName: core.getInput('iam-role-name'),
1616
runnerHomeDir: core.getInput('runner-home-dir'),
1717
preRunnerScript: core.getInput('pre-runner-script'),
18-
blockDeviceMappings: JSON.parse(core.getInput('block-device-mapping')),
19-
keyName: core.getInput('key-name'),
2018
};
2119

2220
const tags = JSON.parse(core.getInput('aws-resource-tags'));

0 commit comments

Comments
 (0)