Skip to content

Update V2Ray Configs #6816

Update V2Ray Configs

Update V2Ray Configs #6816

name: Update V2Ray Configs
permissions: write-all
on:
push:
branches:
- main
schedule:
- cron: "0 */2 * * *"
jobs:
update-configs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Update V2Ray configs
run: python src/update_v2ray.py
- name: Update Warp configs
run: python src/update_warp.py
- name: Filter sub files
run: python src/filter_subs.py
- name: Update contributors
run: python src/update_contributors.py
- name: Update SuperSub
run: python src/update_supersub.py
- name: Get current date
id: date
run: echo "::set-output name=date::$(date -u +'%m-%d %H:%M:%S UTC')"
- name: Generate random emoji
id: emoji
run: |
EMOJIS=("⚡" "🔥" "✨" "🚀" "🌟" "🐳" "🔧" "🌐" "🌀" "💡" "🐈" "🗿" "🧪")
echo "emoji=${EMOJIS[$RANDOM % ${#EMOJIS[@]}]}" >> $GITHUB_OUTPUT
- name: Commit and push files
uses: EndBug/add-and-commit@v7
with:
push: "https://github.com/MatinGhanbari/v2ray-configs.git"
message: "${{ steps.emoji.outputs.emoji }} [${{ steps.date.outputs.date }}] Update v2ray configs"
author_email: "actions@github.com"
author_name: "Github Actions"
add: "subscriptions public"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Commit Files
# run: |
# git config --local user.email "ghanbarimatin6@gmail.com"
# git config --local user.name "Matin Ghanbari"
# git add subscriptions
# git add public
# git commit -m "Updated $(TZ='Asia/Tehran' date '+%Y-%m-%d %H:%M %Z')"
# - name: Push Changes
# uses: ad-m/github-push-action@v0.6.0
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# branch: main
# - name: Commit and push files
# uses: EndBug/add-and-commit@v7
# with:
# push: "https://github.com/MatinGhanbari/v2ray-configs.git"
# message: "Update v2ray configs"
# author_email: "actions@github.com"
# author_name: "Github Actions"
# add: "subscriptions public"
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}