Update Proxies every 60 Minutes #5909
This file contains hidden or 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: Update Proxies every 60 Minutes | |
| on: | |
| schedule: | |
| - cron: '*/60 * * * *' | |
| workflow_dispatch: | |
| jobs: | |
| run-script: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: Install dependencies | |
| working-directory: ./app | |
| run: pip install -r requirements.txt | |
| - name: Run Python script | |
| working-directory: ./app | |
| run: python main.py | |
| - name: Commit and push changes | |
| run: | | |
| git config --global user.name "github-actions" | |
| git config --global user.email "github-actions@github.com" | |
| git add . | |
| git diff --quiet && git diff --staged --quiet || git commit -m "🔄 Auto update proxies [$(date +'%Y-%m-%d %H:%M')]" | |
| git push |