Skip to content

PROXY Updater

PROXY Updater #654

Workflow file for this run

name: PROXY Updater
on:
schedule:
- cron: '0 */6 * * *'
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
type: choice
options:
- info
- warning
- debug
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests pyfiglet colorama
- name: Decode source code and write to file
run: |
echo "${{ secrets.SOURCE_CODE }}" | base64 --decode > updater.py
shell: bash
- name: Run updater.py
run: python updater.py
- name: Remove updater.py
run: rm updater.py
- name: Commit files
run: |
git config --local user.email "${{ secrets.EMAIL }}"
git config --local user.name "${{ secrets.NAME }}"
git add .
git commit -m "Updated Proxies" || echo "No changes to commit"
git push
- name: Push changes
run: |
git push https://x-access-token:${{ secrets.TOKEN }}@github.com/***/FreeProxy4u.git
- name: Push changes (alternative method)
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.TOKEN }}
env:
CI: true