forked from machulav/ec2-github-runner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
100 lines (99 loc) · 3.89 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
name: On-demand self-hosted AWS EC2 runners for GitHub Actions
description: GitHub Action for automatic creation and registration AWS EC2 instances as GitHub Actions self-hosted runners.
author: Volodymyr Machula
branding:
icon: 'box'
color: 'orange'
inputs:
mode:
description: >-
Specify here which mode you want to use:
- 'start' - to start new runners;
- 'stop' - to stop the previously created runners.
required: true
github-token:
description: >-
GitHub Personal Access Token with the 'repo' scope assigned.
required: true
key-pair-name:
description: >-
Key pair name to use when creating the runner instances.
This input is required if you use the 'start' mode.
required: false
ec2-image-id:
description: >-
EC2 Image Id (AMI). The new runners will be launched from this image.
This input is required if you use the 'start' mode.
required: false
ec2-instance-type:
description: >-
EC2 Instance Type.
This input is required if you use the 'start' mode.
required: false
ec2-instance-count:
description: >-
Number of EC2 instances to create.
required: false
default: 1
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.
The runners don't require any inbound traffic. However, outbound traffic should be allowed.
This input is required if you use the 'start' mode.
required: false
label:
description: >-
Name of the unique label assigned to the runners.
The label is used to remove the runners from GitHub when the runners are not needed anymore.
This input is required if you use the 'stop' mode.
required: false
# This input's name is in the singular form for backwards compatibility
ec2-instance-id:
description: >-
EC2 Instance Ids of the created runners.
The ids are used to terminate the EC2 instances when the runners are not needed anymore.
This input is required if you use the 'stop' mode. The value can either be in the form of
a single raw string containing a single EC2 instance id, or a JSON-encoded string representing
an array of id strings.
required: false
iam-role-name:
description: >-
IAM Role Name to attach to the created EC2 instances.
This requires additional permissions on the AWS role used to launch instances.
required: false
aws-resource-tags:
description: >-
Tags to attach to the launched EC2 instances and volumes.
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: >-
Directory that contains actions-runner software and scripts. E.g. /home/runner/actions-runner.
required: false
pre-runner-script:
description: >-
Specifies bash commands to run before the runner starts. It's useful for installing dependencies with apt-get, yum, dnf, etc.
required: false
outputs:
label:
description: >-
Name of the unique label assigned to the runners.
The label is used in two cases:
- to use as the input of 'runs-on' property for the following jobs;
- to remove the runners from GitHub when they are not needed anymore.
# This output's name is in the singular form for backwards compatibility
ec2-instance-id:
description: >-
EC2 Instance Ids of the created runners.
The ids are used to terminate the EC2 instances when the runners are not needed anymore.
runs:
using: node16
main: ./dist/index.js