diff --git a/.github/scripts/ci-health-check.sh b/.github/scripts/ci-health-check.sh index 3b003d4..40ceef5 100755 --- a/.github/scripts/ci-health-check.sh +++ b/.github/scripts/ci-health-check.sh @@ -6,17 +6,17 @@ set -euo pipefail ORG="privilegedescalation" -PLUGIN_REPOS=( - headlamp-polaris-plugin - headlamp-rook-plugin - headlamp-sealed-secrets-plugin - headlamp-intel-gpu-plugin - headlamp-tns-csi-plugin - headlamp-kube-vip-plugin - headlamp-argocd-plugin - headlamp-plugin-template +mapfile -t PLUGIN_REPOS < <( + gh api --paginate "orgs/${ORG}/repos" \ + --jq '.[] | select(.archived == false and .visibility == "public") | .name' \ + 2>/dev/null | grep -E '^headlamp-.+' | sort ) +if [ ${#PLUGIN_REPOS[@]} -eq 0 ]; then + echo "ERROR: No repos discovered for ${ORG}" >&2 + exit 1 +fi + echo "=== CI/CD Health Check — $(date -u '+%Y-%m-%d %H:%M UTC') ===" echo ""