You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-2Lines changed: 12 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -141,9 +141,19 @@ Use the following steps to prepare your workflow for running on your EC2 self-ho
141
141
142
142
These example policies above are provided as a guide. They can and most likely should be limited even more by specifying the resources you use.
143
143
144
+
144
145
2. Add the keys to GitHub secrets.
145
146
3. Use the [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) action to set up the keys as environment variables.
146
147
148
+
> [!IMPORTANT]
149
+
> If you are planning on using Spot instances for your runner, AWS uses a service-linked role to provision the instances.
150
+
>
151
+
> For this to work, at least one of the following must be true:
152
+
> - The service-linked role exists already. This happens if you request a Spot instance via the AWS Console interface.
153
+
> - You create the service-linked role via the Console, AWS CLI or AWS API.
154
+
> - You grant the IAM role above permissions to create the service-linked role at runtime.
155
+
> See the docs [here](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create-service-linked-role.html) and [here](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/service-linked-roles-spot-instance-requests.html) for more details.
156
+
147
157
**2. Prepare GitHub personal access token**
148
158
149
159
1. Create a new GitHub personal access token with the `repo` scope.
@@ -205,8 +215,8 @@ Now you're ready to go!
205
215
|`iam-role-name`| Optional. Used only with the `start` mode. | IAM role name to attach to the created EC2 runner. <br><br> This allows the runner to have permissions to run additional actions within the AWS account, without having to manage additional GitHub secrets and AWS users. <br><br> Setting this requires additional AWS permissions for the role launching the instance (see above). |
206
216
|`aws-resource-tags`| Optional. Used only with the `start` mode. | Specifies tags to add to the EC2 instance and any attached storage. <br><br> This field is a stringified JSON array of tag objects, each containing a `Key` and `Value` field (see example below). <br><br> Setting this requires additional AWS permissions for the role launching the instance (see above). |
207
217
|`runner-home-dir`| Optional. Used only with the `start` mode. | Specifies a directory where pre-installed actions-runner software and scripts are located.<br><br> |
208
-
| `pre-runner-script` | Optional. Used only with the `start` mode. | Specifies bash commands to run before the runner starts. It's useful for installing dependencies with apt-get, yum, dnf, etc. For example:<pre> - name: Start EC2 runner<br> with:<br> mode: start<br> ...<br> pre-runner-script: \|<br> sudo yum update -y && \ <br> sudo yum install docker git libicu -y<br> sudo systemctl enable docker</pre>
209
-
<br><br> |
218
+
|`pre-runner-script`| Optional. Used only with the `start` mode. | Specifies bash commands to run before the runner starts. It's useful for installing dependencies with apt-get, yum, dnf, etc. For example:<pre> - name: Start EC2 runner<br> with:<br> mode: start<br> ...<br> pre-runner-script: \|<br> sudo yum update -y && \ <br> sudo yum install docker git libicu -y<br> sudo systemctl enable docker</pre>|
219
+
|`market-type`| Optional. Used only with the `start` mode. | The only valid option is `spot`. If `spot` is specified, a Spot instance will be requested. If left unspecified, an on-demand instance will be provisioned.|
0 commit comments