-
-
Notifications
You must be signed in to change notification settings - Fork 4
40 lines (33 loc) · 1.12 KB
/
fetch-proxies.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
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)