Add URL checker script and update workflow for provider URL validation

This commit is contained in:
himanshu8443
2025-04-18 19:02:57 +05:30
parent cd4c4f7c41
commit bbcff523f6
3 changed files with 161 additions and 124 deletions

32
.github/workflows/check-urls.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
name: Check Provider URLs
on:
schedule:
- cron: "0 0 * * *" # Run daily at midnight UTC
workflow_dispatch: # Allow manual triggering
jobs:
check-urls:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "16"
- name: Install dependencies
run: npm install axios
- name: Run URL checker
run: node .github/scripts/url-checker.js
- name: Commit changes if any
run: |
git config --global user.name 'GitHub Action'
git config --global user.email 'action@github.com'
git add modflix.json
git diff --cached --quiet || git commit -m "Update provider URLs [skip ci]" && git push