-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 1.08 KB
/
Copy pathrain.yml
File metadata and controls
41 lines (33 loc) · 1.08 KB
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
35
36
37
38
39
40
41
name: Rain Alert Email
env:
SENDER_EMAIL: ${{secrets.SENDER_EMAIL}}
OW_API_KEY: ${{secrets.OW_API_KEY}}
SENDER_EMAIL_PASS: ${{secrets.SENDER_EMAIL_PASSWORD}}
RECIPIENTS_LIST_UK_RAIN_ALERT: ${{secrets.RECIPIENTS_LIST_UK_RAIN_ALERT}}
on:
schedule:
- cron:
'*/10 * * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: python set up
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: requirements
run: pip install -r requirements.txt
- name: send-email
run: python3 'Intermediate/Day 35 - Rain Alert System/send_email.py'
- name: Push changes to Git
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'Github@action.com'
git add . || true
git status
git diff-index --quiet HEAD || (git commit -m 'Updated by GitHub Actions' && git push)