Skip to content

Commit

Permalink
Sync with upstream (#6)
Browse files Browse the repository at this point in the history
* Use the paginate API call to get all runners instead of just the first page. (machulav#51)

* Update dist

* Bump glob-parent from 5.1.1 to 5.1.2 (machulav#47)

Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](gulpjs/glob-parent@v5.1.1...v5.1.2)

---
updated-dependencies:
- dependency-name: glob-parent
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Fix PR automation, update the action version in the example (machulav#54)

* Update tag in the example

* Remove package from the PR automations

* Allow user to pass in a custom actions-runner directory (machulav#56)

* Allow user to pass in a custom actions-runner directory which contains pre-installed runner software and scripts

* Add comment

* Fix input refs

* Fix linter error

* Update dist

* Update the runner version to the latest one (machulav#67)

* Update dist

* fix: `invalid culture identifier` (machulav#88)

* remove `DOTNET_SYSTEM_GLOBALIZATION_INVARIANT`

* build index.js

Signed-off-by: Alex Chi <iskyzh@gmail.com>

* Version updates (machulav#92)

* Update runner version

* Update package-lock.json

* Update dist

* Add link for donation to help Ukraine protect itself from russian occupants

* Update donation URL

* Update wordings

* Bump @actions/core from 1.6.0 to 1.9.1 (machulav#109)

Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.6.0 to 1.9.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update dist

* Bump node-fetch from 2.6.6 to 2.6.7 (machulav#105)

Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.6 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](node-fetch/node-fetch@v2.6.6...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update dist

* Fix deprecation warnings (machulav#123)

* Update node version

* Update version of packages

* Update version of runner

* Update version of actions

* Update dist

* Add required package to the documentation

* Add 'pre-runner-script' option (machulav#154)

Add a 'pre-runner-script' option to specify arbitrary bash commands to run
before the runner starts up on the instance.  This is useful if you need
to install dependencies or have OS-specific setup steps.  For example:

      - name: Start EC2 runner
        with:
	 mode: start
	 ec2-image-id: ami-07bdb09c49774f92e
	 pre-runner-script: |
	      sudo yum update -y && \
	      sudo yum install docker git libicu -y \
	      sudo systemctl enable docker

Signed-off-by: Tony Hutter <hutter2@llnl.gov>

* Compile dist

* Removing dist

---------

Signed-off-by: Alex Chi <iskyzh@gmail.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Co-authored-by: Davin Chia <davinchia@gmail.com>
Co-authored-by: GitHub Actions <runner@fv-az93-126.zwmoqlwq51iuvls2zdlc0jzybe.xx.internal.cloudapp.net>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Volodymyr Machula <machulav@gmail.com>
Co-authored-by: Jukka Palomäki <jukka.palomaki@paf.com>
Co-authored-by: GitHub Actions <runner@fv-az90-268.oknmvzgco44exlvyi5fejcivhg.gx.internal.cloudapp.net>
Co-authored-by: Alex Chi <iskyzh@gmail.com>
Co-authored-by: GitHub Actions <runner@fv-az238-896.lrtv1j1tcsgurjp4mtmc3vvjre.gx.internal.cloudapp.net>
Co-authored-by: GitHub Actions <runner@fv-az335-98.st3fsr2bvbpu5iwsufzt3hrohh.gx.internal.cloudapp.net>
Co-authored-by: GitHub Actions <runner@fv-az502-646.yzlryxntam3u3auahceqrxiktg.dx.internal.cloudapp.net>
Co-authored-by: Tony Hutter <hutter2@llnl.gov>
  • Loading branch information
12 people authored Dec 7, 2023
1 parent 74f7418 commit c3bfc2a
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 69,292 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ Use the following steps to prepare your workflow for running on your EC2 self-ho
4. Create a new EC2 image (AMI) from the instance.
5. Remove the instance if not required anymore after the image is created.

Alternatively, you can use a vanilla EC2 AMI and set up the dependencies via `pre-runner-script` in the workflow YAML file. See example in the `pre-runner-script` documentation below.

**4. Prepare VPC with subnet and security group**

1. Create a new VPC and a new subnet in it.
Expand Down Expand Up @@ -199,11 +201,13 @@ Now you're ready to go!
| `ec2-instance-count` | Number of EC2 instances to create, defaults to 1. | EC2 Instance Count. |
| `subnet-id` | Required if you use the `start` mode. | VPC Subnet Id. <br><br> The subnet should belong to the same VPC as the specified security group. |
| `security-group-id` | Required if you use the `start` mode. | EC2 Security Group Id. <br><br> The security group should belong to the same VPC as the specified subnet. <br><br> Only the outbound traffic for port 443 should be allowed. No inbound traffic is required. |
| `label` | Required if you use the `stop` mode. | Name of the unique label assigned to the runners. <br><br> The label is provided by the output of the action in the `start` mode. <br><br> The label is used to remove the runners from GitHub when the runners are not needed anymore. |
| `ec2-instance-id` | Required if you use the `stop` mode. | EC2 Instance Ids of the created runners. <br><br> The ids are provided by the output of the action in the `start` mode. <br><br> The ids are used to terminate the EC2 instances when the runners are not needed anymore. |
| `iam-role-name` | Optional. Used only with the `start` mode. | IAM role name to attach to the created EC2 runners. <br><br> This allows the runners 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 instances (see above). |
| `aws-resource-tags` | Optional. Used only with the `start` mode. | Specifies tags to add to the EC2 instances 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). |
| `label` | Required if you use the `stop` mode. | Name of the unique label assigned to the runner. <br><br> The label is provided by the output of the action in the `start` mode. <br><br> The label is used to remove the runner from GitHub when the runner is not needed anymore. |
| `ec2-instance-id` | Required if you use the `stop` mode. | EC2 Instance Id of the created runner. <br><br> The id is provided by the output of the action in the `start` mode. <br><br> The id is used to terminate the EC2 instance when the runner is not needed anymore. |
| `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). |
| `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). |
| `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> |
| `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>
<br><br> |

### Environment variables

Expand Down
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ inputs:
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: >-
Expand Down
Loading

0 comments on commit c3bfc2a

Please sign in to comment.