PROXY Updater #5396
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: PROXY Updater | |
on: | |
schedule: | |
- cron: '0 */1 * * *' | |
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 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.7 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pymongo==4.6.1 | |
- name: Run Python | |
env: | |
DB_HOST: ${{ secrets.DB_HOST }} | |
DB_USERNAME: ${{ secrets.DB_USERNAME }} | |
DB_PASSWORD: ${{ secrets.DB_PASSWORD }} | |
run: python main.py | |
- name: Commit files | |
run: | | |
git config --local user.email ${{ secrets.GIT_EMAIL }} | |
git config --local user.name ${{ secrets.GIT_NAME }} | |
git config credential.username ${{ secrets.GIT_NAME }} | |
git commit -am "Updated Proxies" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.TOKEN }} | |
env: | |
CI: true |