tree: a34a164a2e6d6621dd6e15095856f68b91bbe7f2 [path history] [tgz]
  1. cloud-functions/
  2. README.md
.github/gh-actions-self-hosted-runners/helper-functions/README.md

Helper Functions

GCP Cloud Functions

For the local implementation of the following three functions is required to create an .env file. If you'd like to reproduce this code in a GCP Cloud Functions, you will need to replace the variables in the Variables section either as Runtime environment variables or Secrets.

APP_INSTALLATION_ID=
APP_ID=
CLIENT_ID=
PEM_KEY=
CLIENT_NAME=
ORG=
PROJECT_ID=

generateToken

Function implemented to retrieve the GitHub App token for register a self-hosted runner. It's used in the entrypoint of the Dockerfile.

monitorRunnersStatus

Function implemented to get the status of the self-hosted runners. It's used in the monitor_self_hosted_runners workflow.

removeOfflineRunners

Function implemented to delete the unused self-hosted runners. Please refer to this README for more details.