Skip to main content

Ultralytics logo

English | 简体中文

🚀 Ultralytics Actions

Welcome to Ultralytics Actions - a collection of GitHub Actions for automating code quality, PR management, and CI/CD workflows across Ultralytics projects.

GitHub Actions Marketplace

Actions CI Ultralytics Actions GitHub Report codecov

Ultralytics Discord Ultralytics Forums Ultralytics Reddit

📦 Repository Contents

This repository provides three main components:

  1. Ultralytics Actions - Main GitHub Action for AI-powered code formatting, PR summaries, and auto-labeling
  2. Standalone Actions - Reusable composite actions for common CI/CD tasks
  3. Python Package - ultralytics-actions package for programmatic use

Ultralytics Actions (Main Action)

AI-powered formatting, labeling, and PR summaries for Python, JavaScript/TypeScript, Swift, Dart, and web/docs files.

📄 Features

  • Python Code: Formatted using Ruff, an extremely fast Python linter and formatter
  • Python Docstrings: Google-style formatting enforced with Ultralytics Python docstring formatter (optional)
  • JavaScript/TypeScript: Formatted with Biome, an extremely fast formatter for JS, TS, JSX, TSX, and JSON (optional, auto-detected via biome.json or biome.jsonc)
  • Web and Docs Files: Styled with Prettier for JS, TS, CSS, HTML, JSON, YAML, Markdown, and shell scripts
  • Swift Code: Formatted with swift-format (requires macos-latest runner)
  • Dart Code: Formatted with dart format for Dart and Flutter projects
  • Spell Check: Common misspellings caught using codespell
  • Broken Links Check: Broken links identified using Lychee
  • PR Summary: Concise Pull Request summaries generated using AI
  • PR Review: AI-powered code reviews identify critical bugs, security issues, and quality concerns with suggested fixes
  • Auto-labeling: Applies relevant labels to issues, PRs, and discussions via AI

🤖 Supported AI Providers

Choose between OpenAI or Anthropic for AI-powered features:

Provider Default Model Default PR Review Model API Key
OpenAI gpt-6-luna gpt-6-luna openai_api_key
Anthropic claude-haiku-5-5 claude-haiku-5-5 anthropic_api_key

The provider is auto-detected based on which API key you provide. Override with the model input, or use review_model to override PR review only.

🛠️ How It Works

Triggers on GitHub events to streamline workflows:

  • Pull Requests: Ensures formatting standards, generates summaries, provides AI reviews, and applies labels
  • Issues: Automatically applies relevant labels using AI
  • Discussions: Automatically applies relevant labels using AI

🔧 Setup

Create .github/workflows/ultralytics-actions.yml:

# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license

# Ultralytics Actions https://github.com/ultralytics/actions
# This workflow formats code and documentation in PRs to Ultralytics standards

name: Ultralytics Actions

on:
  issues:
    types: [opened]
  discussion:
    types: [created]
  pull_request:
    branches: [main]
    types: [opened, closed, synchronize, review_requested]

permissions:
  contents: write # Modify code in PRs
  pull-requests: write # Add comments and labels to PRs
  issues: write # Add comments and labels to issues
  discussions: write # Add labels to discussions

jobs:
  actions:
    runs-on: ubuntu-latest
    steps:
      - name: Run Ultralytics Actions
        uses: ultralytics/actions@main
        with:
          token: ${{ secrets.GITHUB_TOKEN }} # Auto-generated token
          labels: true # Auto-label issues/PRs using AI
          python: true # Format Python with Ruff
          # python-version: "3.14" # Optional: set up a specific Python version (default: runner Python)
          python_docstrings: true # Format Python docstrings (default: true)
          biome: true # Format JS/TS with Biome (auto-detected via biome.json or biome.jsonc)
          prettier: true # Format YAML, JSON, Markdown, CSS
          swift: false # Format Swift (requires macos-latest)
          dart: false # Format Dart/Flutter
          spelling: true # Check spelling with codespell
          links: true # Check broken links with Lychee
          summary: true # Generate AI-powered PR summaries
          # AI API keys - provide OpenAI OR Anthropic (model auto-detected from key)
          openai_api_key: ${{ secrets.OPENAI_API_KEY }}
          # anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
          # model: gpt-6-luna  # Optional: set model explicitly
          # review_model: claude-opus-5-5  # Optional: override PR review model
          brave_api_key: ${{ secrets.BRAVE_API_KEY }} # Used for broken link resolution

Standalone Actions

Reusable composite actions for common CI/CD tasks. Each can be used independently in your workflows.

1. Retry Action

Retry failed commands with exponential backoff and jitter.

- uses: ultralytics/actions/retry@main
  with:
    run: npm install
    retries: 3
    timeout_minutes: 5

📖 Full Documentation →

2. Cleanup Disk Action

Free up disk space on GitHub runners by removing unnecessary packages and files.

- uses: ultralytics/actions/cleanup-disk@main

📖 Full Documentation →

3. GitHub Report Action

Summarize open PRs and failed default-branch GitHub Actions across organization repositories.

- uses: ultralytics/actions/github-report@main
  with:
    token: ${{ secrets.GITHUB_TOKEN }}
    org: ultralytics # Optional: defaults to ultralytics
    visibility: all # Optional: public, private, internal, all, or comma-separated
    auto_merge_actions_prs: true # Optional: auto-merge eligible GitHub Actions update PRs

📖 Full Documentation →

4. Dependabot Action

Update GitHub Actions versions across organization repositories with cached release resolution.

- uses: ultralytics/actions/dependabot@main
  with:
    token: ${{ secrets.GITHUB_TOKEN }}

📖 Full Documentation →

5. CLA Action

Check every pull request commit author against the central Ultralytics CLA signature ledger.

- uses: ultralytics/actions/cla@main
  with:
    github-token: ${{ secrets.GITHUB_TOKEN }}
    cla-token: ${{ secrets._GITHUB_TOKEN }}

📖 Full Documentation →

6. Setup uv Action

Use the official uv setup action with Ultralytics defaults: the latest uv with a fallback, and an activated venv on the newest preinstalled runner Python.

- uses: ultralytics/actions/setup-uv@main

📖 Full Documentation →

7. Failure Alert Action

Post a Slack alert for a failed workflow run with an AI triage of the failed job logs: a Bug, Transient or Unclear verdict with the decisive error and its likely cause.

- uses: ultralytics/actions/failure-alert@main
  with:
    slack_webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
    openai_api_key: ${{ secrets.OPENAI_API_KEY }}

📖 Full Documentation →

Python Package

Install the ultralytics-actions package for programmatic access to action utilities, including all requirements, in a Python>=3.8 environment.

PyPI - Version Ultralytics Downloads PyPI - Python Version

uv pip install ultralytics-actions

Available Modules:

  • actions.review_pr - AI-powered PR review
  • actions.summarize_pr - Generate PR summaries
  • actions.github_report - Generate GitHub organization reports
  • actions.failure_alert - Slack alerts with AI triage of failed workflow runs
  • actions.first_interaction - Welcome message for new contributors
  • And more in actions/ directory

💡 Contribute

Ultralytics thrives on community collaboration, and we deeply value your contributions! Please see our Contributing Guide for details on how you can get involved. We also encourage you to share your feedback through our Survey. A huge thank you 🙏 to all our contributors!

Ultralytics open-source contributors

📄 License

Ultralytics offers two licensing options:

  • AGPL-3.0 License: An OSI-approved open-source license ideal for students, researchers, and enthusiasts who value open collaboration. See the LICENSE file for details.
  • Enterprise License: Designed for commercial use, this license allows integrating Ultralytics software and AI models into commercial products without AGPL-3.0's open-source requirements. For enterprise solutions, contact Ultralytics Licensing.

📫 Contact

For bug reports or feature suggestions related to Ultralytics Actions, please submit an issue via GitHub Issues. Join our Discord community for discussions and support!


Ultralytics GitHub space Ultralytics LinkedIn space Ultralytics Twitter space Ultralytics YouTube space Ultralytics TikTok space Ultralytics BiliBili space Ultralytics Discord

Metadata

Release files for ultralytics-actions 0.5.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ultralytics-actions 0.5.17
File Size Uploaded Provenance
ultralytics_actions-0.5.17.tar.gz 144.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ultralytics-actions 0.5.17
File Interpreter ABI Platform
ultralytics_actions-0.5.17-py3-none-any.whl Python 3 none any Details

Total release size: 256.7 kB

Release files / ultralytics_actions-0.5.17.tar.gz

Download URL ultralytics_actions-0.5.17.tar.gz
Size 144.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9e3dce67c0cceb79866bb9b46a200363b1c66b7f11916b4050dc54b367a17674
BLAKE2b-256 checksum
How to use checksums
a9c7f43922c5b8a8127ebf4b59b54342acc3d8a69e817cd4c8f328b7ef0e982c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Release files / ultralytics_actions-0.5.17-py3-none-any.whl

Download URL ultralytics_actions-0.5.17-py3-none-any.whl
Size 112.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7bac44017b52110bcc4693ee606e160ead1b3f448b31e53fb250df802f49ac40
BLAKE2b-256 checksum
How to use checksums
1cea6290f6b6354b433cece51f5c05199b2f503278d399070324355a3aa898a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

Security for ultralytics-actions 0.5.17

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ultralytics_actions-0.5.17.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.5.17 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page