Skip to content

Auto Update V2Ray Subscriptions #77

Auto Update V2Ray Subscriptions

Auto Update V2Ray Subscriptions #77

Workflow file for this run

name: Auto Update V2Ray Subscriptions
on:
schedule:
- cron: '0 */12 * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT }}
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: pip install requests
- name: Run Collector Script
run: python collector.py
- name: Commit and Push
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
# Добавляем все изменения
git add subs/ README.md
# Если есть изменения — коммитим
if git diff --staged --quiet; then
echo "✅ Нет новых изменений"
else
git commit -m "Auto update: $(date '+%Y-%m-%d %H:%M:%S UTC')"
# Пушим с обработкой конфликтов
git pull --rebase origin main || true
git push
echo "✅ Успешно обновлено и запушено"
fi