Files
actions/dependabot/action.yml

66 lines
2.0 KiB
YAML

# Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license
name: "Dependabot"
author: "Ultralytics"
description: "Update GitHub Actions versions across organization repos with cached lookups. A centralized alternative to per-repo Dependabot configuration."
branding:
icon: "refresh-cw"
color: "blue"
inputs:
token:
description: "GitHub token with contents:write, pull-requests:write, and workflow permissions"
required: true
org:
description: "GitHub organization name"
required: false
default: "ultralytics"
public:
description: "Scan public repositories"
required: false
default: "true"
private:
description: "Scan private repositories"
required: false
default: "true"
internal:
description: "Scan internal repositories"
required: false
default: "true"
runs:
using: "composite"
steps:
- uses: ultralytics/actions/setup-uv@main
- 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="https://github.com/ultralytics/actions/archive/${GITHUB_SHA}.tar.gz"
else
packages="https://github.com/ultralytics/actions/archive/refs/heads/main.tar.gz"
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: Dependabot
env:
GH_TOKEN: ${{ inputs.token }}
ORG: ${{ inputs.org }}
PUBLIC: ${{ inputs.public }}
PRIVATE: ${{ inputs.private }}
INTERNAL: ${{ inputs.internal }}
run: |
echo "::group::Dependabot"
python -m actions.dependabot
echo "::endgroup::"
shell: bash