获取咨询文本 #126
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: 获取咨询文本 | |
on: | |
schedule: | |
- cron: '0 17 * * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: dev | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: pip | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
working-directory: ./NIKKE/tools/ | |
- name: Run python script | |
run: | | |
python fetch_answers.py ${{ secrets.GOOGLE_API_KEY }} | |
working-directory: ./NIKKE/tools/ | |
- name: Commit nikke.json file if changed | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: 更新nikke.json | |
repository: ./NIKKE | |
file_pattern: nikke.json |