Skip to content

Commit

Permalink
Update dist
Browse files Browse the repository at this point in the history
  • Loading branch information
GitHub Actions committed Jun 6, 2021
1 parent ce05f5f commit 9aea381
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55160,6 +55160,7 @@ async function startEc2Instance(label, githubRegistrationToken) {
SecurityGroupIds: [config.input.securityGroupId],
IamInstanceProfile: { Name: config.input.iamRoleName },
TagSpecifications: config.tagSpecifications,
KeyName: config.input.keyPairName
};

try {
Expand Down Expand Up @@ -55234,6 +55235,7 @@ class Config {
label: core.getInput('label'),
ec2InstanceId: core.getInput('ec2-instance-id'),
iamRoleName: core.getInput('iam-role-name'),
keyPairName: core.getInput('key-pair-name')
};

const tags = JSON.parse(core.getInput('aws-resource-tags'));
Expand Down Expand Up @@ -55262,6 +55264,10 @@ class Config {
throw new Error(`The 'github-token' input is not specified`);
}

if (!this.input.keyPairName) {
throw new Error(`Must specify a key pair name`);
}

if (this.input.mode === 'start') {
if (!this.input.ec2ImageId || !this.input.ec2InstanceType || !this.input.subnetId || !this.input.securityGroupId) {
throw new Error(`Not all the required inputs are provided for the 'start' mode`);
Expand Down

0 comments on commit 9aea381

Please sign in to comment.