mirror of
https://github.com/Arrowar/StreamingCommunity.git
synced 2025-06-06 11:35:29 +00:00
Add manual trigger to workflow
This commit is contained in:
parent
a1c57c0753
commit
068b6ad6c0
13
.github/workflows/schedule-script.yml
vendored
13
.github/workflows/schedule-script.yml
vendored
@ -1,33 +1,28 @@
|
|||||||
name: Run Script Every 6 Hours
|
name: Run Script Every 6 Hours
|
||||||
|
|
||||||
# Configura il cron job
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 */6 * * *"
|
- cron: "0 */6 * * *" # Esegui ogni 6 ore
|
||||||
|
workflow_dispatch: # Aggiungi questo trigger manuale
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run-script:
|
run-script:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
# Step 1: Clona il repository
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
# Step 2: Configura Python
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.9"
|
python-version: "3.10"
|
||||||
|
|
||||||
# Step 3: Installa le dipendenze
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
|
||||||
# Step 4: Esegui lo script
|
|
||||||
- name: Execute the script
|
- name: Execute the script
|
||||||
run: |
|
run: |
|
||||||
python Test/call_updateDomain.py
|
python Test/call_updateDomain.py
|
||||||
|
Loading…
x
Reference in New Issue
Block a user