Skip to content

Fetch V2Ray Config #2427

Fetch V2Ray Config

Fetch V2Ray Config #2427

Workflow file for this run

name: Fetch V2Ray Config
on:
schedule:
- cron: "*/30 * * * *"
workflow_dispatch:
jobs:
update-configs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install telethon requests
- name: Run script
env:
TELEGRAM_SESSION_STRING: ${{ secrets.TELEGRAM_SESSION_STRING }}
TELEGRAM_API_ID: ${{ secrets.TELEGRAM_API_ID }}
TELEGRAM_API_HASH: ${{ secrets.TELEGRAM_API_HASH }}
run: |
python FetchConfig.py
- name: Commit and push changes
run: |
git config --global user.name "GitHub Action"
git config --global user.email "action@github.com"
git add Config/vless.txt || true
git add Config/vmess.txt || true
git add Config/shadowsocks.txt || true
git add Logs/channel_stats.json || true
git add Logs/invalid_channels.txt || true
git add Logs/collector.log || true
git add Logs/telegram_channels.json || true
git commit -m "Update configs" || echo "No changes to commit"
git push || echo "Failed to push changes, check permissions"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}