-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
73 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Start self hosted EC2 runner | ||
|
||
inputs: | ||
aws-region: | ||
description: AWS Region, e.g. us-east-1 | ||
required: true | ||
aws-access-key-id: | ||
description: AWS Access Key ID. Provide this key if you want to assume a role using access keys rather than a web identity token. | ||
required: true | ||
aws-secret-access-key: | ||
description: AWS Secret Access Key. Required if aws-access-key-id is provided. | ||
required: true | ||
ec2-instance-id: | ||
description: AWS EC2 instance ID for the self hosted runner | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
aws-access-key-id: ${{ inputs.aws-access-key-id }} | ||
aws-secret-access-key: ${{ inputs.aws-secret-access-key }} | ||
aws-region: ${{ inputs.aws-region }} | ||
- name: Start EC2 self hosted runner | ||
shell: bash | ||
run: | | ||
sudo apt update | ||
sudo apt install awscli -y | ||
aws ssm send-command --instance-ids ${{ inputs.ec2-instance-id }} --document-name StartGithubSelfHostedRunner --output text | ||
aws ssm list-command-invocations |