Skip to content

Update Resource Database #24

Update Resource Database

Update Resource Database #24

name: Update Resource Database
on:
workflow_dispatch:
jobs:
update-resources:
runs-on: ubuntu-latest
steps:
- name: Check out main repo
uses: actions/checkout@v3
with:
token: ${{ secrets.PUSH_KEY }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install Python dependencies
run: pip install lupa
- name: Clone Windower/Resources outside workspace
run: |
git clone https://github.com/Windower/Resources.git /tmp/resources_data
- name: Run Python script
run: |
python resources/scripts/generate_items.py /tmp/resources_data/resources_data/items.lua resources/scripts/items.db
- name: Configure Git
run: |
git config --global user.name 'cyrite'
git config --global user.email '[email protected]'
- name: Commit and push only resources.db
run: |
if git diff --quiet --exit-code resources/resources.db; then
echo "No changes to resources.db"
else
git add resources/resources.db
git commit -m "Updating resource database"
git push
fi