Update Dependents Info #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 is a STANDALONE report file that gets fully overwritten — it must NOT be | |
| # the README, or the whole README is destroyed. badgeMarkdownFile updates only the | |
| # "Used by" badge in README in-place, between the gh-dependents-info-used-by markers. | |
| markdownFile: ./docs/github-dependents-info.md | |
| badgeMarkdownFile: ./README.md | |
| sort: stars | |
| minStars: 1 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Inject top dependent repositories into README | |
| run: | | |
| python3 .github/scripts/inject_dependents.py \ | |
| --source docs/github-dependents-info.md \ | |
| --readme README.md \ | |
| --top 20 | |
| - 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 docs/github-dependents-info.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 |