Skip to content

update workflow

update workflow #5

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: # Allow manual trigger
push:
paths:
- .github/workflows/*.yml # Triggers when workflow files are updated
- checker.py # Triggers when checker.py is updated
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 version
run: python checker.py
- name: Commit and push changes
if: success() && 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 versions.fetch"
git push