Skip to content

Commit

Permalink
Added option to use launch-template
Browse files Browse the repository at this point in the history
  • Loading branch information
Danleb committed Apr 16, 2023
1 parent 47e91f4 commit 6e36476
Show file tree
Hide file tree
Showing 9 changed files with 39,118 additions and 41,621 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,11 @@ Don't forget to add the [github-runner-ec2-stop](https://github.com/rogisolorzan
See [self-hosted runner security](https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security) for more info on security considerations. It is recommended to only use self-hosted runners in private repositories.

This action starts the runner as an ephemeral runner. See the default startup command in `src/index.ts` -> `getStartupCommands`. You can use the `startup-commands` param to pass in your custom startup commands to change any behavior and run your own scripts.

# Development

To rebuild the `./dist/index.js` file, run:

```sh
ncc build src/index.ts --license licenses.txt
```
26 changes: 23 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,41 @@ inputs:
GitHub Personal Access Token with the 'repo' scope.
subnet-id:
required: true
required: false
description: >-
The subnet ID that the EC2 instance will be created in.
This subnet and security group should be in the same VPC.
security-group-id:
required: true
required: false
description: >-
EC2 Security Group Id.
This subnet and security group should be in the same VPC.
The runner itself just needs to be able to make an outbound HTTPS connection.
No inbound traffic is needed.
launch-template:
required: false
description: >-
Set 'true' to use the launch template, set 'false' to use image id and explicit configuration parameters. Defaults to false.
launch-template-id:
required: false
description: >-
Launch template id from the EC2 console. Set only if using the launch template approach.
launch-template-name:
required: false
description: >-
Launch template name from the EC2 console. Set only if using the launch template approach.
launch-template-version:
required: false
description: >-
Launch template version to use. Set only if using the launch template approach.
image-id:
required: true
required: false
description: >-
The AMI ID to use.
Expand Down
Loading

0 comments on commit 6e36476

Please sign in to comment.