Skip to content

Commit

Permalink
Display runners status
Browse files Browse the repository at this point in the history
  • Loading branch information
igorpecovnik committed Dec 30, 2024
1 parent b90261b commit 40cffcc
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/generate-runners-status.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: "Generate runners status"

on:
push:
schedule:
- cron: '0 * * * *' # Run every hour
workflow_dispatch: # Manually triggered via GitHub Actions UI

concurrency:
group: redirector
cancel-in-progress: false

jobs:

Check:

name: "Check permissions"
runs-on: "ubuntu-24.04"
steps:

- name: "Check permissions"
uses: armbian/actions/team-check@main
with:
ORG_MEMBERS: ${{ secrets.ORG_MEMBERS }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TEAM: "Release manager"

build:
name: "Get source of truth"
runs-on: ubuntu-24.04
needs: Check
steps:

- name: "Install dependencies: jq"
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: jq
version: 1.0

- name: "Get runners from ORG"
env:
GH_TOKEN: ${{ secrets.RUNNERS }}
run: |
# get runners
for i in `seq 0 1 10`; do
gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/orgs/${{ github.repository_owner }}/actions/runners
done

0 comments on commit 40cffcc

Please sign in to comment.