Daily update Microsoft IP ranges lists #2942
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Daily update Microsoft IP ranges lists | |
on: | |
schedule: | |
- cron: '8 * * * *' # Runs every day | |
workflow_dispatch: | |
jobs: | |
fetch-Microsoft-IP-From-Microsoft-list: | |
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 pandas lxml[html_clean] requests_html | |
- name: Run scripts from the Microsoft folder | |
run: | | |
cd Lists/Ranges_IP_Address_Company_List/Microsoft | |
python Get_Microsoft_IP_Ranges_From_Microsoft.py | |
- name: List files | |
run: ls -la Lists/Ranges_IP_Address_Company_List/Microsoft | |
- name: Commit and Push results | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git pull | |
git add Lists/Ranges_IP_Address_Company_List/Microsoft/* | |
git commit -m "Update Microsoft IP ranges List Daily" --allow-empty | |
git push |