Lädt...

🔧 Self-hosted GitHub Actions runners using AWS CodeBuild


Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: dev.to

Introduction

I have always wanted to have the most efficient setup for the self-hosted GitHub Actions runners.
I think AWS recent announcement helps to approach this goal.

So I was keen to test it myself.

Instructions

Open the CodeBuild console and create a new project with the name aws-codebuild-github-action-self-hosted-runner. This name will be also used in the GitHub actions workflow at the runs-on parameter.

Open the CodeBuild console and create a new project

Select GitHub from the available Sources and select the default connect option Connect using OAuth.
You can find more details on GitHub OAuth here.

Select GitHub from the available Sources

Select the default connect option  raw `Connect using OAuth` endraw

Select the GitHub repository from the drop-down list.

Select the GitHub repository

Check the Rebuild every time a code change is pushed to this repository checkbox at the Primary source webhook events section.

Select WORKFLOW_JOB_QUEUED from the Event types.

Select  raw `WORKFLOW_JOB_QUEUED` endraw  from the Event types

Leave the default values in the Environment section.

Leave the default values in the Environment section

Choose Use a buildspec file in the Buildspec section.

Choose  raw `Use a buildspec file` endraw  in the Buildspec section

And at the last step click on Create build project.

Click on Create build project

After the project is created you can check if the required webhook exists in your repo.
Please use the following URL after you replace the words written in capital letters with your repo's related values:

https://github.com/USER-NAME/REPOSITORY-NAME/settings/hooks

Check if the required webhook exists in your repo

The last step is to create a workflow in your repo and then you can start using CodeBuild as your self-hosted GitHub action runner as a just-in-time runner.

name: Hello World

on: [push]

jobs:
  codebuild-job:
    runs-on: codebuild-aws-codebuild-github-action-self-hosted-runner-${{ github.run_id }}-${{ github.run_attempt }}
    steps:
      - run: |
          echo "Hello World!"

You just need to add this GitHub Actions workflow yaml file to the following place in your repo and name the file as you like it. In my case it's codebuild.yaml:

.github/workflows/codebuild.yml

And when you commit and push this change the CodeBuild job just kicks off.

CodeBuild job just kicks off

...

🔧 Harnessing Managed GitHub Action Runners on AWS CodeBuild for Efficient DevOps Workflows


📈 55.64 Punkte
🔧 Programmierung

🔧 Scaling GitHub Actions Runners on AWS: A Cost-Effective and Scalable Approach


📈 41.37 Punkte
🔧 Programmierung

🔧 Using ARM-based GitHub Actions Runners for Workflows


📈 39.85 Punkte
🔧 Programmierung

🔧 CodeBuild Meets GitHub Actions: A Seamless CI Workflow with Lambda


📈 39.38 Punkte
🔧 Programmierung

🎥 Supercharge�your CI/CD with �Arm Runners in GitHub Actions


📈 36.06 Punkte
🎥 Video | Youtube

🔧 Understanding GitHub Actions Runners


📈 36.06 Punkte
🔧 Programmierung

🔧 macOS vs Ubuntu: GitHub Actions Runners


📈 36.06 Punkte
🔧 Programmierung

🔧 How to Integrate AWS CodePipeline with GitHub and CodeBuild: Complete Guide for CI/CD


📈 35.05 Punkte
🔧 Programmierung

🔧 Deploying Terraform Code via AWS CodeBuild and AWS CodePipeline


📈 34.54 Punkte
🔧 Programmierung

🔧 Deploying a Vite app on GitHub Pages using GitHub Actions with GitHub Secrets


📈 30.91 Punkte
🔧 Programmierung

🔧 Accessing GitHub Action runners using Netbird


📈 30.2 Punkte
🔧 Programmierung

🔧 Desplegar imagen docker usando AWS CodeBuild.


📈 29.23 Punkte
🔧 Programmierung

🔧 AWS CodeBuild


📈 29.23 Punkte
🔧 Programmierung

🕵️ AWS CodeBuild Plugin up to 0.26 on Jenkins AWSClientFactory.java information disclosure


📈 29.23 Punkte
🕵️ Sicherheitslücken

🕵️ Jenkins AWS CodeBuild Plugin bis 0.26 AWSClientFactory.java Information Disclosure


📈 29.23 Punkte
🕵️ Sicherheitslücken

🔧 Implementing CI/CD on AWS: A Complete Guide with CodePipeline, CodeBuild, and CodeDeploy


📈 29.23 Punkte
🔧 Programmierung

🔧 Building Serverless CI/CD Pipelines with AWS CodePipeline and CodeBuild


📈 29.23 Punkte
🔧 Programmierung

🔧 AWS CodeBuild يدعم الآن منفذي GitLab المدارة


📈 29.23 Punkte
🔧 Programmierung

🔧 Say Goodbye to Extra CodeBuild Projects: AWS CodePipeline’s New Commands Action Explained


📈 29.23 Punkte
🔧 Programmierung

🍏 How to use AWS CodeBuild to make macOS apps


📈 29.23 Punkte
🍏 iOS / Mac OS

🎥 Conversational Actions overview - Actions Builder & Actions SDK


📈 28.94 Punkte
🎥 Videos

🎥 Actions Project - Actions Builder & Actions SDK


📈 28.94 Punkte
🎥 Videos

🔧 Secure Your GitHub Repos! Prevent Merging AWS, Azure, and GCP Sensitive Credentials with GitHub Actions


📈 26.61 Punkte
🔧 Programmierung

🔧 Building a CI Tool for GitHub Runners


📈 26.41 Punkte
🔧 Programmierung

🔧 Github ARC Runners sur EKS - Assume roles


📈 26.41 Punkte
🔧 Programmierung

🔧 Introducing RunsOn: 10x cheaper GitHub Action runners


📈 26.41 Punkte
🔧 Programmierung

🔧 [Github actions][actions]


📈 25.12 Punkte
🔧 Programmierung

🔧 Cargo Actions: An efficient tool for managing and creating GitHub Actions workflow templates


📈 25.12 Punkte
🔧 Programmierung

🔧 actions-hottest🚀: GitHub Actions for Commenting on Golang Unit Test Results in Pull Requests


📈 25.12 Punkte
🔧 Programmierung

🐧 Gitea is working on a built-in CI/CD tool called Gitea Actions (compatible with GitHub Actions syntax)


📈 25.12 Punkte
🐧 Linux Tipps

🔧 Building and Deploying a Custom Site Using GitHub Actions and GitHub Pages.


📈 25.08 Punkte
🔧 Programmierung

matomo