-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (43 loc) · 1.25 KB
/
update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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 }}