forked from machulav/ec2-github-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
120 lines (117 loc) · 4.66 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: On-demand self-hosted AWS EC2 runner for GitHub Actions
description: GitHub Action for automatic launching and registration of AWS EC2 instance as GitHub Actions self-hosted runner.
author: Volodymyr Machula / Erhhung Yuan
branding:
icon: box
color: orange
inputs:
mode:
description: >-
Specify here which mode you want to use:
- 'start' - to start a new runner;
- 'stop' - to stop the previously created runner.
required: true
github-token:
description: >-
GitHub Personal Access Token with the 'repo' scope assigned.
required: true
image-id:
description: >-
EC2 Image ID (AMI). The new runner will be launched from this image.
This action is compatible with Amazon Linux 2023 images.
This input is required if you use the 'start' mode.
required: false
instance-type:
description: >-
EC2 Instance Type.
This input is required if you use the 'start' mode.
required: false
subnet-id:
description: >-
VPC Subnet ID. The subnet should belong to the same VPC as the specified security group.
This input is required if you use the 'start' mode.
required: false
security-group-id:
description: >-
EC2 Security Group ID.
The security group should belong to the same VPC as the specified subnet.
Only outbound traffic for port 443 should be allowed. No inbound traffic is required.
This input is required if you use the 'start' mode.
required: false
labels:
description: >-
Name(s) (in CSV form) of unique labels to assign to the runner.
These labels will be appended to by the output of the action in 'start' mode to include a unique ID.
Use these labels to remove the runner from GitHub when the runner is no longer needed.
This input is required if you use the 'stop' mode.
required: false
instance-id:
description: >-
EC2 Instance ID of the created runner.
This ID is provided by the output of the action in 'start' mode.
This ID is used to terminate the EC2 instance when the runner is no longer needed.
This input is required if you use the 'stop' mode.
required: false
iam-role-name:
description: >-
IAM Role Name to attach to the created EC2 instance.
This requires additional permissions on the AWS role used to launch instances.
required: false
spot-instance:
description: >-
Whether to launch the runner as a Spot instance.
If set to 'true', the runner will be launched as a Spot instance with default options.
required: false
default: 'false'
root-volume-device:
description: >-
Root volume device name. The default value is '/dev/xvda', but depends on the AMI used.
See https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/device_naming.html#available-ec2-device-names.
required: false
default: /dev/xvda
root-volume-type:
description: >-
Root volume type. The default value is 'gp3'.
required: false
default: gp3
root-volume-size:
description: >-
Root volume size in GiB. The default value is '8'.
required: false
default: '8'
aws-resource-tags:
description: >-
Tags to attach to the launched EC2 instance and volume.
This must be a stringified array of AWS Tag objects, with both Key and Value fields.
For example: '[{"Key": "TagKey1", "Value": "TagValue1"}, {"Key": "TagKey2", "Value": "TagValue2"}]'
required: false
default: '[]'
runner-home-dir:
description: >-
Specifies a directory where pre-installed actions-runner software and scripts are located.
required: false
pre-runner-script:
description: >-
Specifies Bash commands to run as the root user before the runner starts.
It's useful for installing dependencies with apt-get, yum, dnf, etc.
Please be aware that the commands will be sourced by Bash with '-e -u -x -o pipefail'
options set, so suppress harmless errors using 'false || true' construct if necessary.
required: false
outputs:
labels:
description: >-
Name(s) (in CSV form) of input labels, if any, plus a unique label assigned to the runner.
These labels are used in two cases:
- to use as the 'runs-on' property value of subsequent jobs;
- to remove the runner from GitHub when it is no longer needed.
instance-id:
description: >-
EC2 Instance ID of the created runner.
This ID is used to terminate the EC2 instance when the runner is no longer needed.
runner-name:
description: >-
Name of the created runner.
This is the EC2 instance hostname, which may be customized by the 'pre-runner-script'.
runs:
using: node20
main: ./dist/index.js