-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUpdate-alerts.yml
More file actions
34 lines (27 loc) · 870 Bytes
/
Copy pathUpdate-alerts.yml
File metadata and controls
34 lines (27 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Auto-Update Weather Alerts
on:
schedule:
- cron: "*/5 * * * *" # Runs every 5 minutes
jobs:
update_alerts:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: pip install requests
- name: Run alert script
run: python update_alerts.py
- name: Commit and push updates
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name "G34hWeatherSpotter"
git config --global user.email "G34hWeatherSpotter@users.noreply.github.com"
git add alerts.txt
git commit -m "Updated alerts" || echo "No changes to commit"
git push