Skip to content

.github/workflows/update_json.yml #13

.github/workflows/update_json.yml

.github/workflows/update_json.yml #13

Workflow file for this run

name: Manual JSON Sync
on:
schedule:
- cron: "0 0 * * *"
jobs:
update_json:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Download JSON
run: curl -o tvbox.json https://www.xzbgg.top/tvbox.json
- name: Check if JSON has changed
id: check_changes
run: |
git diff --exit-code tvbox.json || echo "::set-output name=has_changes::true"
continue-on-error: true
- name: Commit and push changes
if: steps.check_changes.outputs.has_changes == 'true'
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add -A
git commit -m "Update tvbox.json $(date '+%Y-%m-%d %H:%M:%S')"
git push