GitHub Actions Poll Mode AutoScaler (GAPMAS)

Overview

GitHub Actions Poll Mode AutoScaler (GAPMAS)

What

GitHub Actions Poll Mode AutoScaler, or GAPMAS, is a simple tool that helps you run ephemeral GitHub Actions self-hosted runners on your own infrastructure.

Why

  • Simplicity

    Minimal infrastructure is required to use the tool, in its simplest form this could be managed from a crontab entry on any Linux machine.

  • Poll vs. Push

    The tool reaches out to the GitHub API to look for any queued jobs. The benefit of this approach is that you don't need any service exposed to the internet for this to work.

How

  1. Create GitHub Personal Access Token

    • Personal Access Tokens are associated with a GitHub Account.
    • The account itself needs Admin level permissions to the repository you want to manage runners for.
    • The personal access token requires the public_repo scope.
  2. Set up Environment variables

    Environment variables

    GH_ORG

    The GitHub organization the repository given in GH_REPO resides in.

    GH_REPO

    Name of the GitHub repository we operate on.

    GH_USER

    Username for authentication to the GitHub API.

    GH_TOKEN

    GitHub Personal Access Token.

    OS_KEY_NAME

    Name of OpenStack key pair to associate with the instances we create.

    OS_NETWORK_NAME

    Name of OpenStack network to attach to the instances we create.

    OS_TAG

    Tag to apply to instances. The tool will manage the life cycle of instances and uses this tag to know which instances to operate on.

    • OpenStack client environment
      • The OpenStack provider makes use of the standard OpenStack environment variables for authentication.
  3. Set up a job manager to run the tool periodically

    • When a change is proposed to a repository with workflows destined to self-hosted runners, GitHub will queue the job until a runner consumes it.
    • The tool makes use of this behavior to create new runners whenever there are jobs queued.
    • As such choose a cadence for the run which is in line with how long you would expect to wait before your jobs start.
  4. Create workflow in repository

    • Workflow jobs with 'self-hosted' as the first label in runs-on will be scheduled for self hosted runners.

    • Labels on the form 'distro-release' will be used as input for what type of image you want the job to run on. Example:

      name: Take out tests
      
      on:
        - push
        - pull_request
      
      jobs:
        hello:
          runs-on: [self-hosted, ubuntu-21.10]
          steps:
            - name: hello
              run: |
                echo "Hello, world!"
    • If an image matching the requested distro/release can not be found the tool will fall back to look for a Ubuntu 20.04 image.

Owner
Frode Nordahl
Frode Nordahl
🐍 Mnemonic code for generating deterministic keys, BIP39

python-mnemonic 🐍 Mnemonic code for generating deterministic keys, BIP39 Installation To install this library and its dependencies use: pip install m

9 Dec 22, 2022
This is a Anti Channel Ban Robots

AntiChannelBan This is a Anti Channel Ban Robots delete and ban message sent by channels Heroku Deployment 💜 Heroku is the best way to host ur Projec

BᵣₐyDₑₙ 25 Dec 10, 2021
DankMemer-Farmer - Autofarm Self-Bot for Discord bot Named Dankmemer.

DankMemer-Farmer Autofarm Self-Bot for Discord bot Named Dankmemer. Warning We are not responsible if you got banned, since "self-bots" outside of the

Mole 16 Dec 14, 2022
An Open Source ALL-In-One Telegram RoBot, that can do lot of things.

An Open Source ALL-In-One Telegram RoBot, that can do lot of things.

JOBIN 0 Dec 01, 2021
Powerful and Advance Telegram Bot with soo many features😋🔥❤

Chat-Bot Reach this bot on Telegram Chat Bot New Features 🔥 ✨ Improved Chat Experience ✨ Removed Some Unnecessary Commands ✨ Added Facility to downlo

Sanila Ranatunga 10 Oct 21, 2022
Userbot untuk memutar video dan lagu di vcg/os

Userbot untuk memutar video dan lagu di vcg/os

FJ_GAMING 2 Nov 13, 2021
Python API for British Geological Survey magnetic field calculator

Magnetic field calculator Python API for British Geological Survey magnetic field calculator. Description This project magnetic field calculator. It u

Filip Š 3 Mar 11, 2022
A telegram bot that can send you high-quality audio 🎧🎧🎧

Music downloader bot Still under development Please Report issues to improve this repo.I will try to fix bugs in next update Music downloader bot is a

Anish Gowda 36 Dec 06, 2022
The public discord bot, created by: primitt, further developed by: duino-coin team.

Duino Stats Mini A public Duino-Stats Discord bot. Click this link to invite the bot to your server. License Duino Stats Mini distributed under the MI

primboi 8 Mar 14, 2022
Easy to use API Wrapper for somerandomapi.ml.

Overview somerandomapi is an API Wrapper for some-random-api.ml Examples Asynchronous from somerandomapi import Animal

Myxi 1 Dec 31, 2021
Dados Públicos de CNPJ disponibilizados pela Receita Federal do Brasil

Dados Públicos CNPJ Fonte oficial da Receita Federal do Brasil, aqui. Layout dos arquivos, aqui. A Receita Federal do Brasil disponibiliza bases com o

Aphonso Henrique do Amaral Rafael 102 Dec 28, 2022
A free tempmail api for your needs!

Tempmail A free tempmail api for your needs! Website · Report Bug · Request Feature Features Add your own private domains Easy to use documentation No

dropout 10 Oct 26, 2021
a simple python script that monitors the binance hotwallet and refunds the withdrawal fee to encourage people to withdraw their Nano and help decentralisation

Nano_Binance_Refund_Bot a simple python script that monitors the binance hotwallet and refunds the withdrawal fee to encourage people to withdraw thei

James Coxon 5 Apr 07, 2022
A Discord bot to allow people to create lists of random characters, with limit reroll options.

Mugen Bot A small bot I made to practice python and allow people to publically select random characters on a discord server. Uses py-cord, as that is

Haley 2 Feb 06, 2022
Wordnik Python public library

Python 2.7 client for Wordnik.com API Overview This is a Python 2.7 client for the Wordnik.com v4 API. For more information, see http://developer.word

Wordnik 224 Dec 29, 2022
A bot to share Facebook posts.

bot_share_facebook a bot to share Facebook posts. install & clone untuk menjalankan anda bisa melalui terminal contohnya termux, cmd, dan terminal lai

Muhammad Latif Harkat 7 Dec 07, 2022
An automated bot for twitter using Tweepy!

Tweeby An automated bot for twitter using Tweepy! About This bot will look for tweets that contain certain hashtags, if found. It'll send them a messa

Ori 1 Dec 06, 2021
AminoAutoRegFxck/AutoReg For AminoApps.com

AminoAutoRegFxck AminoAutoRegFxck/AutoReg For AminoApps.com Termux apt update -y apt upgrade -y pkg install python git clone https://github.com/deluvs

3 Jan 18, 2022
Telegram vc - A bot that can play music on telegram group's voice call

Telegram Voice Chat Bot A bot that can play music on telegram group's voice call

1 Jan 02, 2022
Cord Python API Client

Cord Python API Client The data programming platform for AI 💻 Features Minimal low-level Python client that allows you to interact with Cord's API Su

Cord 52 Nov 25, 2022