Auto Proxy Fetch #124
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: Auto Proxy Fetch | |
on: | |
schedule: | |
- cron: '0 */6 * * *' # Läuft alle 6 Stunden | |
workflow_dispatch: # Manueller Trigger | |
push: | |
paths: | |
- 'fetch_proxies.py' # Läuft wenn das Script geändert wird | |
jobs: | |
fetch-and-update: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # Erlaubt das Pushen von Änderungen | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run proxy fetcher | |
run: python fetch_proxies.py | |
- name: Commit and push if changed | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add proxies.txt | |
git diff --quiet && git diff --staged --quiet || (git commit -m "🤖 Update proxy list [skip ci]" && git push) |