Skip to content

Commit

Permalink
Add hash (#3)
Browse files Browse the repository at this point in the history
* Add hash

* test16

* update dist

* release 18

* update substr

* update dist
  • Loading branch information
marcosmicJack authored Dec 6, 2024
1 parent ed136b4 commit d69ee93
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
11 changes: 8 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62932,14 +62932,19 @@ const github = __webpack_require__(95438);

class Config {
constructor() {
let label_list = JSON.parse(core.getInput('labels'));
let mode_option = core.getInput('mode')
if (mode_option === 'start'){
label_list.push(this.generateUniqueLabel())
}
this.input = {
mode: core.getInput('mode'),
mode: mode_option,
githubToken: core.getInput('github-token'),
ec2ImageId: core.getInput('ec2-image-id'),
ec2InstanceType: core.getInput('ec2-instance-type'),
subnetId: core.getInput('subnet-id'),
securityGroupId: core.getInput('security-group-id'),
labels: core.getInput('labels'),
labels: label_list,
ec2InstanceIds: core.getInput('ec2-instance-ids'),
iamRoleName: core.getInput('iam-role-name'),
runnerHomeDir: core.getInput('runner-home-dir'),
Expand Down Expand Up @@ -62990,7 +62995,7 @@ class Config {
return Math.random().toString(36).substr(2, 5);
}
getLabels() {
return JSON.parse(this.input.labels)
return this.input.labels
}
getEc2InstanceIds(){
return JSON.parse(this.input.ec2InstanceIds)
Expand Down
11 changes: 8 additions & 3 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@ const github = require('@actions/github');

class Config {
constructor() {
let label_list = JSON.parse(core.getInput('labels'));
let mode_option = core.getInput('mode')
if (mode_option === 'start'){
label_list.push(this.generateUniqueLabel())
}
this.input = {
mode: core.getInput('mode'),
mode: mode_option,
githubToken: core.getInput('github-token'),
ec2ImageId: core.getInput('ec2-image-id'),
ec2InstanceType: core.getInput('ec2-instance-type'),
subnetId: core.getInput('subnet-id'),
securityGroupId: core.getInput('security-group-id'),
labels: core.getInput('labels'),
labels: label_list,
ec2InstanceIds: core.getInput('ec2-instance-ids'),
iamRoleName: core.getInput('iam-role-name'),
runnerHomeDir: core.getInput('runner-home-dir'),
Expand Down Expand Up @@ -61,7 +66,7 @@ class Config {
return Math.random().toString(36).substr(2, 5);
}
getLabels() {
return JSON.parse(this.input.labels)
return this.input.labels
}
getEc2InstanceIds(){
return JSON.parse(this.input.ec2InstanceIds)
Expand Down

0 comments on commit d69ee93

Please sign in to comment.