Skip to content

Update Domains

Update Domains #2

Workflow file for this run

name: Update Domains
on:
schedule:
- cron: "0 8 * * *" # Esegui alle 08:00 solo il venerdì (giorno 5 della settimana)
workflow_dispatch: # Permette di avviare manualmente il workflow
push:
branches:
- '**' # matches every branch
jobs:
update-domains:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install dependencies
run: |
pip install requests
- name: Update domains in config.json
run: |
python update_domains.py
- name: Commit and push changes
run: |
git config --global user.email "your-email@example.com"
git config --global user.name "Your Name"
git add config.json
# Controlla se ci sono modifiche prima di fare il commit
if git diff --staged --quiet; then
echo "Nessuna modifica trovata in config.json. Il commit non è necessario."
else
git commit -m "Aggiornamento domini in config.json"
git push
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}