update-model-info #584
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: update-model-info | |
on: | |
# schedule: | |
# - cron: "0 10 * * *" # 10:00, everyday | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
if: github.ref == 'refs/heads/dev' | |
permissions: write-all | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 2 | |
- name: update model info | |
run: | | |
python -m pip install -r requirements-dev.txt | |
changes=$(git diff --name-only HEAD^..HEAD -- models) | |
if [ ! -z "$changes" ]; then | |
python $(pwd)/ci/update_model_info_deparate.py --f "$changes" | |
fi | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
username: ${{ secrets.UPDATE_MODEL_USERNAME }} | |
email: ${{ secrets.UPDATE_MODEL_EMAIL }} |