Skip to content

Update Proxy Configs #46

Update Proxy Configs

Update Proxy Configs #46

name: Update Proxy Configs
on:
schedule:
- cron: '0 * * * *'
workflow_dispatch:
permissions:
contents: write
jobs:
update-configs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run config fetcher
run: python src/fetch_configs.py
- name: Commit and push if changed
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add configs/proxy_configs.txt
git diff --quiet && git diff --staged --quiet || (git commit -m "Update proxy configs" && git push)