Skip to content

Update Dependents Info #3

Update Dependents Info

Update Dependents Info #3

name: Update Dependents Info
on:
schedule:
- cron: '0 0 * * 0' # Weekly on Sunday at midnight UTC
workflow_dispatch: # Allow manual trigger
permissions:
contents: write
jobs:
update-dependents:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
ref: develop # master is protected; commit docs to develop and let it flow to master via the normal merge
- name: Update dependents info
uses: nvuillam/github-dependents-info@v3.2.0
with:
repo: bezzad/Downloader
markdownFile: ./README.md
badgeMarkdownFile: ./README.md
sort: stars
minStars: 1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Commit and push changes
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add README.md
if git diff --staged --quiet; then
echo "No dependents changes to commit."
else
git commit -m "docs: update dependents info"
git push origin HEAD:develop
fi