-
-
Notifications
You must be signed in to change notification settings - Fork 83
50 lines (40 loc) · 1.62 KB
/
companies_ip_ranges.yml
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
42
43
44
45
46
47
48
49
50
name: Daily IP Range Updates
on:
schedule:
- cron: '0 7 * * *' # Runs at 07:00 AM every day
workflow_dispatch:
jobs:
fetch-ip-ranges:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests beautifulsoup4 pandas
- name: Run the script
run: python Lists/Ranges_IP_Address_Company_List/bgp.he.net/get_ip_range.py -list microsoft,webex,DigitalOcean,Zscaler,Teamviewer,AS211805,AS206728,AS216309,Netskope -format csv
- name: List files in the root directory
run: ls -la
- name: List files in the Lists/TOR directory
run: ls -la Lists/Ranges_IP_Address_Company_List/bgp.he.net/
- name: Move output files to correct directory (if necessary)
run: |
mv *_IP_Ranges.csv Lists/Ranges_IP_Address_Company_List/bgp.he.net/ || echo "File not found in root."
- name: Commit and Push results
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add Lists/Ranges_IP_Address_Company_List/bgp.he.net/*_IP_Ranges.csv
git commit -m "Update daily IP ranges" --allow-empty
git push
- name: Upload Results to Artifacts
uses: actions/upload-artifact@v3
with:
name: ip-range-data
path: Lists/Ranges_IP_Address_Company_List/bgp.he.net/*_IP_Ranges.csv