mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 00:39:13 +00:00

* feat(docs): add indexer docs update script Add Python script to automatically update indexer documentation from YAML definitions. - Creates a markdown table of supported indexers with feature support - Sorts indexers alphabetically with generics at the end - Includes support status for IRC and RSS features - Outputs documentation to autobrr.com/snippets/indexers.mdx * fix: use existing PAT * fix: use correct token * feat(docs): add freeleech support documentation
64 lines
No EOL
1.8 KiB
YAML
64 lines
No EOL
1.8 KiB
YAML
name: Update Indexers List
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '0 0 * * *'
|
|
repository_dispatch:
|
|
types: [update-indexers]
|
|
|
|
jobs:
|
|
update-indexers:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Check out autobrr.com repo
|
|
uses: actions/checkout@v3
|
|
with:
|
|
repository: 'autobrr/autobrr.com'
|
|
path: 'autobrr.com'
|
|
token: ${{ secrets.DOCS_TOKEN }}
|
|
|
|
- name: Check out autobrr repo
|
|
uses: actions/checkout@v3
|
|
with:
|
|
repository: 'autobrr/autobrr'
|
|
path: 'autobrr'
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.x'
|
|
|
|
- name: Update indexers list
|
|
run: python3 autobrr/scripts/update-indexers.py
|
|
|
|
- name: Create Pull Request
|
|
run: |
|
|
cd autobrr.com
|
|
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
|
git config --local user.name "github-actions[bot]"
|
|
|
|
# Create a new branch
|
|
BRANCH_NAME="update-indexers-$(date +%Y%m%d-%H%M%S)"
|
|
git checkout -b $BRANCH_NAME
|
|
|
|
# Add and commit changes
|
|
git add snippets/indexers.mdx snippets/freeleech.mdx
|
|
|
|
# Only proceed if there are changes
|
|
if ! git diff --quiet && ! git diff --staged --quiet; then
|
|
git commit -m "docs: update indexers and freeleech support lists"
|
|
git push origin $BRANCH_NAME
|
|
|
|
# Create PR using GitHub CLI
|
|
gh pr create \
|
|
--repo autobrr/autobrr.com \
|
|
--base main \
|
|
--head $BRANCH_NAME \
|
|
--title "docs: update indexers and freeleech support lists" \
|
|
--body "Automated update of the indexers and freeleech support lists from definitions" \
|
|
--label "documentation"
|
|
fi
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.DOCS_TOKEN }} |