This commit is contained in:
Yorgei
2026-01-18 14:29:12 +10:00
commit e23ac642a7
21 changed files with 3370 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
name: Update Data
on:
schedule:
- cron: '0 */6 * * *'
workflow_dispatch:
jobs:
update-data:
runs-on: ubuntu-latest
container:
image: nikolaik/python-nodejs:python3.12-nodejs22-slim
steps:
- name: Install system dependencies
run: |
apt-get update
apt-get install -y git
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Run download script
run: python download_data.py
- name: Check for changes and commit
run: |
git config --global user.name 'Gitea Actions'
git config --global user.email 'actions@noreply.gitea.io'
# Check if new_data.json has changed
if [[ -n $(git status -s chrome-extension/new_data.json) ]]; then
echo "Changes detected in new_data.json"
git add chrome-extension/new_data.json
git commit -m "Auto-update new_data.json"
git push
else
echo "No changes detected"
fi