Skip to content

Update Prowlarr Supported Indexers #515

Update Prowlarr Supported Indexers

Update Prowlarr Supported Indexers #515

Workflow file for this run

name: Update Prowlarr Supported Indexers
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
update-wiki:
runs-on: ubuntu-latest
if: github.repository == 'Servarr/Wiki'
permissions:
contents: write
env:
API_KEY: fakeapikey
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install pip packages
run: |
pip3 install -U --no-cache-dir \
requests==2.31.0 \
pycountry==23.12.11 \
python_iso639==2024.2.7
- name: Update supported indexers markdown
run: |
echo "<Config><LaunchBrowser>False</LaunchBrowser><ApiKey>${{ env.API_KEY }}</ApiKey></Config>" | tee prowlarr-config.xml
docker run -d --rm --name=prowlarr -e TZ=Etc/UTC -p 9696:9696 -v "$(pwd)/prowlarr-config.xml":/config/config.xml ghcr.io/linuxserver/prowlarr:nightly
sleep 15
APP_VERSION=$(curl -sL "http://localhost:9696/api?apikey=${{ env.API_KEY }}" -I | awk 'BEGIN {RS="\r\n"; FS=": "}/^X-Application-Version/{print $2}')
echo "PROWLARR_VERSION=$APP_VERSION" >> $GITHUB_ENV
echo "PROWLARR_VERSION=$APP_VERSION" >> $GITHUB_STEP_SUMMARY
python scripts/convert_prowlarr_supported_indexers_to_markdown.py -k "${{ env.API_KEY }}" -u "http://localhost:9696" -o "prowlarr/supported-indexers.md" -s "prowlarr/supported-indexers.md.hash"
docker stop prowlarr
- name: Commit changes
run: |
git config --global user.name "Servarr"
git config --global user.email "[email protected]"
git add prowlarr/supported-indexers.md
git add prowlarr/supported-indexers.md.hash
if git status | grep -q modified
then
git commit -m "[script] supported indexers $(date --iso-8601=seconds)"
git push
else
echo "No changes since last run"
fi