https://github.com/ci-for-research/on-demand-runner

https://github.com/ci-for-research/on-demand-runner

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (5.1%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: ci-for-research
  • License: apache-2.0
  • Language: JavaScript
  • Default Branch: master
  • Size: 11.7 KB
Statistics
  • Stars: 0
  • Watchers: 4
  • Forks: 0
  • Open Issues: 6
  • Releases: 0
Created about 6 years ago · Last pushed about 6 years ago
Metadata Files
Readme License

README.md

GitHub action runnner on demand function

An AWS function that checks whether recieved check_run is allowed to run and tells runner admin what to do in the log.

To setup you need

  1. a repo with a Self hosted runner registered, but offline
  2. a AWS profile called serverless to use for deploying the AWS Lambda function, use ./policy.json as the policy for the user.
  3. node.js

Deploy

shell npx serverless deploy

It should output a endpoint URL.

Setup web hook

In GH repo settings create a new web hook.

  • Use endpoint URL from deploy as Payload URL
  • Use content type application/json
  • Select only Check runs event

Test

Make change to repo to trigger a check_run webhook.

In AWS console go to log events of the check_run Lambda function and follow instructions that appear in the log. The log message should tell you to start/stop runner or cancel workflow.

Undeploy

Remove webhook in GitHub

Remove AWS function with

shell npx serverless remove

Owner

  • Name: ci-for-research
  • Login: ci-for-research
  • Kind: organization

GitHub Events

Total
Last Year