mirror of
https://github.com/himanshu8443/providers.git
synced 2026-04-17 21:41:45 +00:00
Update check-urls.yml
This commit is contained in:
20
.github/workflows/check-urls.yml
vendored
20
.github/workflows/check-urls.yml
vendored
@@ -2,8 +2,12 @@ name: Check Provider URLs
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 0 * * *" # Run daily at midnight UTC
|
- cron: '0 0 * * *' # Run daily at midnight UTC
|
||||||
workflow_dispatch: # Allow manual triggering
|
workflow_dispatch: # Allow manual triggering
|
||||||
|
|
||||||
|
# Option 1: Set explicit permissions for the GITHUB_TOKEN
|
||||||
|
permissions:
|
||||||
|
contents: write # Allows writing to the repository
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-urls:
|
check-urls:
|
||||||
@@ -12,11 +16,15 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
# Option 2: Use a Personal Access Token instead
|
||||||
|
# Uncomment the following lines if using PAT approach
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.PAT }} # Use the PAT you added in repository secrets
|
||||||
|
|
||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: "16"
|
node-version: '18' # Updated to a more recent Node.js version
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm install axios
|
run: npm install axios
|
||||||
@@ -26,7 +34,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Commit changes if any
|
- name: Commit changes if any
|
||||||
run: |
|
run: |
|
||||||
git config --global user.name 'GitHub Action'
|
git config --local user.name 'github-actions[bot]'
|
||||||
git config --global user.email 'action@github.com'
|
git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com'
|
||||||
git add modflix.json
|
git add modflix.json
|
||||||
git diff --cached --quiet || git commit -m "Update provider URLs [skip ci]" && git push
|
git diff --cached --quiet || (git commit -m "Update provider URLs [skip ci]" && git push)
|
||||||
|
|||||||
Reference in New Issue
Block a user