Automatic update of class model #221
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Automatic update | |
run-name: Automatic update of class model | |
on: | |
schedule: | |
- cron: "0 4 * * *" # every day at 4am | |
workflow_dispatch: | |
jobs: | |
auto_update: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: . | |
concurrency: auto_update | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Install Python dependencies | |
uses: py-actions/py-dependency-install@v4 | |
with: | |
path: "requirements_update.txt" | |
- name: Run automatic update | |
run: python3 automatic_update.py | |
working-directory: ./model_update | |
- name: Commit files | |
working-directory: . | |
run: | | |
git pull | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
git commit -m "auto updated class model" | |
git push |