get proxy #19194
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: get proxy | |
on: | |
schedule: | |
- cron: '*/180 * * * *' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo content | |
uses: actions/checkout@v2 | |
- name: Setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Install python packages | |
run: | | |
python -m pip install --upgrade pip | |
pip install requests | |
pip install rich | |
pip install pysocks | |
- name: Pull files | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "MuRongPIG" | |
git pull origin main | |
- name: Get proxies | |
run: | | |
python getproxy.py | |
python checkproxy.py 256 | |
- name: Commit files | |
run: | | |
git add -A | |
git commit -m "Update Proxies (`date '+%F %H:%M %Z'`)" -a | |
git branch -u origin/main | |
- name: Push changes | |
uses: ad-m/[email protected] | |
with: | |
github_token: ${{ secrets.TOKEN_GITHUB }} | |
branch: main |