91 lines
2.9 KiB
YAML
91 lines
2.9 KiB
YAML
# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
|
|
|
|
name: "GitHub Report"
|
|
author: "Ultralytics"
|
|
description: "Summarize open PRs and failed default-branch GitHub Actions across organization repositories"
|
|
branding:
|
|
icon: "activity"
|
|
color: "blue"
|
|
inputs:
|
|
token:
|
|
description: "GitHub token with access to scanned repositories"
|
|
required: true
|
|
org:
|
|
description: "GitHub organization name"
|
|
required: false
|
|
default: "ultralytics"
|
|
visibility:
|
|
description: "Repository visibility: public, private, internal, all, or comma-separated"
|
|
required: false
|
|
default: "public"
|
|
prs:
|
|
description: "Include open PR summary"
|
|
required: false
|
|
default: "true"
|
|
failed_actions:
|
|
description: "Include failed default-branch Actions summary"
|
|
required: false
|
|
default: ""
|
|
failed_scheduled_actions:
|
|
description: "Deprecated alias for failed_actions"
|
|
required: false
|
|
default: ""
|
|
auto_merge_actions_prs:
|
|
description: "Auto-merge eligible GitHub Actions update PRs in the PR section"
|
|
required: false
|
|
default: "true"
|
|
max_run_pages:
|
|
description: "Pages of workflow runs to inspect per repository"
|
|
required: false
|
|
default: "3"
|
|
days:
|
|
description: "Days of workflow history to include"
|
|
required: false
|
|
default: "1"
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- uses: astral-sh/setup-uv@v7
|
|
with:
|
|
ignore-empty-workdir: true
|
|
enable-cache: false
|
|
version: "0.9.4"
|
|
|
|
- name: Install ultralytics-actions
|
|
env:
|
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
|
GITHUB_SHA: ${{ github.sha }}
|
|
run: |
|
|
echo "::group::Install ultralytics-actions"
|
|
if [ "$GITHUB_REPOSITORY" = "ultralytics/actions" ]; then
|
|
echo "Installing from commit: $GITHUB_SHA"
|
|
packages="git+https://github.com/ultralytics/actions@${GITHUB_SHA}"
|
|
else
|
|
packages="git+https://github.com/ultralytics/actions@main"
|
|
fi
|
|
if [ "$(uname)" = "Darwin" ]; then
|
|
uv pip install --system --break-system-packages $packages
|
|
else
|
|
sudo env "PATH=$PATH" uv pip install --system --break-system-packages $packages
|
|
fi
|
|
echo "::endgroup::"
|
|
shell: bash
|
|
|
|
- name: GitHub Report
|
|
env:
|
|
GH_TOKEN: ${{ inputs.token }}
|
|
ORG: ${{ inputs.org }}
|
|
VISIBILITY: ${{ inputs.visibility }}
|
|
REPO_VISIBILITY: ${{ github.event.repository.visibility }}
|
|
REPORT_PRS: ${{ inputs.prs }}
|
|
REPORT_FAILED_ACTIONS: ${{ inputs.failed_actions }}
|
|
REPORT_FAILED_SCHEDULED_ACTIONS: ${{ inputs.failed_scheduled_actions }}
|
|
AUTO_MERGE_ACTIONS_PRS: ${{ inputs.auto_merge_actions_prs }}
|
|
MAX_RUN_PAGES: ${{ inputs.max_run_pages }}
|
|
REPORT_DAYS: ${{ inputs.days }}
|
|
run: |
|
|
echo "::group::GitHub Report"
|
|
python -m actions.github_report
|
|
echo "::endgroup::"
|
|
shell: bash
|