Skip to content

fix checker.py

fix checker.py #9

Workflow file for this run

name: Check Minecraft Updates
on:
schedule:
- cron: '15 10 * * *' # Runs at 10:15 AM (CLT/CLST) daily (to match Mojang's approximated release hour)
workflow_dispatch:
push:
paths:
- .github/workflows/*.yml
- checker.py
jobs:
check-minecraft-version:
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.10'
- name: Install dependencies
run: pip install requests
- name: Check for new Minecraft versions
id: check-for-updates
run: |
python checker.py
env:
OUTPUT_FILE: $GITHUB_ENV
- name: Commit and push changes
if: steps.check-for-updates.outputs.new_versions == 'true'
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Update Minecraft server versions"
git push