Skip to content

Update Hearthbot Database #1594

Update Hearthbot Database

Update Hearthbot Database #1594

Workflow file for this run

name: Update Hearthbot Database
on:
workflow_dispatch:
schedule:
- cron: '15 0,2 * * *'
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Update dependencies
run: |
poetry update hearthstone
poetry update hearthstone-data
poetry export -o requirements.txt
- name: Update submodules
run: |
git submodule update --init --recursive
git submodule update --remote --recursive
- name: Commit
run: |
git config --global user.email zelknow@outlook.com
git config --global user.name ZelKnow
git add .
if [ -z "$(git status --porcelain)" ]; then
exit 0
fi
git commit -m "✨feat: Hearthstone update"
- name: Push
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}