Skip to content

SatelCreative/satel-gh-runner-status

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub self-hosted runner status check

This centralized GitHub action checks status (online, offline) of a self hosted runnner

Usage

name: Runner status check
on:
  ... 

jobs:
  self-hosted-status:
    runs-on: ubuntu-latest
    outputs:
      runner-status: ${{ steps.runnerstatus.outputs.status }}
    steps:
      - name: Check runner status
        id: runnerstatus
        uses: SatelCreative/[email protected]
        with:       
          github-runner-token: ${{ secrets.SELF_HOSTED_RUNNER_TOKEN }} #Fine grained token with access to self hosted runners only 
          org-name": <organization-name>

And it can be used for other jobs as follows

 # if self-hosted is offline, runs the job on a GitHub hosted runner
 runs-on: ${{ contains(needs.self-hosted-status.outputs.runner-status, 'online') && 'self-hosted' || 'ubuntu-latest' }} 

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages