Skip to content

update open shelter data #4031

update open shelter data

update open shelter data #4031

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