update open shelter data #4122
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 open shelter data | |
on: | |
schedule: | |
- cron: "0 */3 * * *" # 3時間毎に実行 | |
workflow_dispatch: | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
architecture: "x64" | |
- name: built environment | |
run: | # 環境構築 | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: run update process | |
run: | | |
python src/create_open_shelter_data.py | |
# 変更があるか確認 | |
- name: check for changes and ommit open shelter data | |
id: git_status | |
run: | | |
git add -N . | |
if ! git diff --exit-code --quiet | |
then | |
git config --global user.name "${{ github.actor }}" | |
git config --global user.email "${{ github.actor }}@users.noreply.github.com" | |
git add data/ | |
git commit -m 'update open shelter data' | |
git push origin main | |
fi |