-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (32 loc) · 1.1 KB
/
ipanalysis.yml
File metadata and controls
39 lines (32 loc) · 1.1 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
name: Analyze Logs and Notify
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *" # Runs daily at midnight
jobs:
analyze-logs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
run: python -m pip install --upgrade pip && pip install json
- name: Run finding_IP script
env:
JSON_FILE: ./path/to/ip_logs.json # Make sure the file is included in your repo or accessible
run: python finding_IP.py
- name: Notify via email
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com
server_port: 587
username: ${{ secrets.EMAIL_USERNAME }}
password: ${{ secrets.EMAIL_PASSWORD }}
subject: "Log Analysis Results"
body: "The log analysis has been completed. Check the results in the Actions logs."
to: recipient@example.com
from: ${{ secrets.EMAIL_USERNAME }}