GitHub Actions on EC2 instances

0

Hi AWS, I want to test a sample app as part of POC on the enterprise EC2 instances (both Linux and Windows). Having said that I want to build CI/CD for the app on both platforms using GitHub Actions but the condition is the servers should be private in nature. Also I need to know how can we RDP and SSH into the instances to install GitHub Actions runner. Do we need to use any bastion instance or OpenVPN server. How does the infrastructure setup look like?

Thanks

profile picture
Arjun
asked 8 months ago306 views
1 Answer
0

A few months ago, I started working on a very similar solution and came up with the following scalable and cost-efficient solution.

  1. GitHub sends a webhook event when starting a job.
  2. The API Gateway receives the event.
  3. A Lambda function validates the event and sends a message to SQS.
  4. Another Lambda function reads the message from SQS and launches an EC2 instance in an VPC of your choice.
  5. The EC2 instance starts and registers the GitHub runner.
  6. The GitHub runner executes the job.
  7. The EC2 instance terminates itself.

Spin up EC2 instances to provide self-hosted GitHub runners on-demand

My solution is called HyperEnv for GitHub Actions Runner.

answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions