Skip to content

Update Bedrock Server Data #854

Update Bedrock Server Data

Update Bedrock Server Data #854

Workflow file for this run

name: Update Bedrock Server Data
on:
workflow_dispatch:
schedule:
- cron: '30 18 * * *' # Run daily
jobs:
update:
runs-on: ubuntu-latest
name: Update
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install requirements
run: |
python -m pip install --upgrade pip
pip install -r scripts/requirements.txt
- name: Run script
run: python scripts/update.py
- name: Check for Changes
id: check_changes
run: |
if [[ -n "$(git diff --exit-code)" ]]; then
echo "Changes detected."
echo "value=true" >> $GITHUB_OUTPUT
else
echo "No changes detected."
echo "value=false" >> $GITHUB_OUTPUT
fi
- name: Commit changes
if: steps.check_changes.outputs.value == 'true'
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m "feat: update bedrock server data"
git push