WARRRP Script Runner #1413
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: WARRRP Script Runner | |
on: | |
push: | |
branches: [ "main" ] | |
schedule: | |
- cron: '0 * * * *' # Runs every hour | |
workflow_dispatch: | |
jobs: | |
run_warp_script: | |
runs-on: ubuntu-latest | |
env: | |
BOT_EMAIL: github-actions[bot]@users.noreply.github.com | |
BOT_NAME: github-actions[bot] | |
PLUS_KEY: ${{ secrets.PLUS_KEY }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install ipaddress | |
pip install pytz | |
- name: Run WARRRP Script | |
run: python warrrp.py | |
- name: Commit and Push Changes | |
run: | | |
git config --global user.email "${{ env.BOT_EMAIL }}" | |
git config --global user.name "${{ env.BOT_NAME }}" | |
git add -A | |
git diff-index --quiet HEAD || git commit -m "Automatic update" | |
git push |