ProtonVPN Data Processing #535
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: ProtonVPN Data Processing | |
on: | |
schedule: | |
- cron: '0 */6 * * *' # Runs at minute 0 every 6 hours | |
workflow_dispatch: | |
jobs: | |
process-data: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install Requests | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests logging | |
- name: Run the script | |
run: python Lists/VPN/ProtonVPN/get_protonvpn_ip_list.py | |
- name: List files in the root directory | |
run: ls -la | |
- name: List files in the Lists/VPN/ProtonVPN/ directory | |
run: ls -la Lists/VPN/ProtonVPN/ | |
- name: Move output files to correct directory (if necessary) | |
run: | | |
mv protonvpn_ip_list.csv Lists/VPN/ProtonVPN/ || echo "File not found in root." | |
- name: Commit and Push Changes | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add Lists/VPN/ProtonVPN/protonvpn_ip_list.csv | |
git commit -m "Update ProtonVPN IPs list" --allow-empty | |
git push | |
- name: Upload csv Results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ProtonVPN-IP-data-csv | |
path: Lists/VPN/ProtonVPN/protonvpn_ip_list.csv |