mirror of
https://github.com/CreepsoOff/source.git
synced 2026-05-07 18:49:32 +00:00
Create update-json-files.yml
This commit is contained in:
parent
240754d824
commit
fea4f03eac
1 changed files with 33 additions and 0 deletions
33
.github/workflows/update-json-files.yml
vendored
Normal file
33
.github/workflows/update-json-files.yml
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
name: Fetch JSON Files
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * *" # Tous les jours à minuit UTC
|
||||||
|
workflow_dispatch: # Permet de lancer manuellement
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
fetch-json:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup Python
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: 3.9
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: pip install requests
|
||||||
|
|
||||||
|
- name: Fetch and Save JSON Files
|
||||||
|
run: python fetch_json_files.py
|
||||||
|
|
||||||
|
- name: Commit Changes
|
||||||
|
run: |
|
||||||
|
git config --global user.name "GitHub Actions"
|
||||||
|
git config --global user.email "actions@github.com"
|
||||||
|
git add .
|
||||||
|
git commit -m "Update JSON files" || echo "No changes to commit"
|
||||||
|
git push
|
||||||
Loading…
Reference in a new issue