Run Updater Script #15815
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: Run Updater Script | |
on: | |
schedule: | |
- cron: '*/30 * * * *' # Runs every 30 minutes | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: Log level | |
required: true | |
default: warning | |
type: choice | |
options: | |
- info | |
- warning | |
- debug | |
jobs: | |
run-script: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' # Specify the Python version you need | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install useragenter requests | |
- name: Remover Json and Downloader | |
run: rm -r *.json&&curl -L ${{ secrets.GIT_UPDATER }} -o updater.py | |
- name: Permisioner Files | |
run: chmod +x updater.py&&python updater.py | |
- name: Run Remover Py Updater | |
run: rm -r *.py | |
- name: Commit and Push Changes | |
run: | | |
git config --global user.email "${{ secrets.GIT_EMAIL }}" | |
git config --global user.name "${{ secrets.GIT_NAME }}" | |
git pull | |
git add -A | |
git commit -m "Update Rate List" | |
git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }} | |
GIT_UPDATER: ${{ secrets.GIT_UPDATER }} | |
GIT_PLUG: ${{ secrets.GIT_PLUG }} | |
GIT_EMAIL: ${{ secrets.GIT_EMAIL }} | |
GIT_NAME: ${{ secrets.GIT_NAME }} |