-
Notifications
You must be signed in to change notification settings - Fork 22
60 lines (50 loc) · 1.67 KB
/
main.yml
File metadata and controls
60 lines (50 loc) · 1.67 KB
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
51
52
53
54
55
56
57
58
59
60
name: V2Ray Config Extractor & Checker
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout Main Repository
uses: actions/checkout@v4
- name: Checkout Sub-Checker Repository
uses: actions/checkout@v4
with:
repository: arshiacomplus/sub-checker
path: sub-checker
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
echo "Installing Python packages..."
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then
pip install -r requirements.txt
fi
if [ -f sub-checker/requirements.txt ]; then
pip install -r sub-checker/requirements.txt
fi
- name: Run Main Extractor Script
env:
SEND_TO_TELEGRAM: true
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
TELEGRAM_CHANNEL_ID: ${{ secrets.TELEGRAM_CHANNEL_ID }}
run: python scripts/main.py
- name: Commit and Push Results
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add -A .
if git diff --staged --quiet; then
echo "No changes to commit."
else
git commit -m "📊 Update V2Ray configs"
git push
fi