This repository has been archived by the owner on Mar 31, 2024. It is now read-only.
.github/workflows/update.yml #1131
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 dataset | |
on: | |
push: | |
schedule: | |
- cron: 0 9 * * * # 09:00UTC(18:00JST) | |
jobs: | |
update: | |
name: Update dataset | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.9'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python - | |
- name: Add path for Poetry | |
run: echo "$HOME/.poetry/bin" >> $GITHUB_PATH | |
- name: Install dependencies | |
run: poetry install --no-interaction --no-dev | |
- name: Download | |
run: | | |
make clean | |
make download | |
- name: Arrange | |
run: make arrange | |
- name: Figure | |
run: | | |
make figure | |
make clean | |
- name: Git setting | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "ki-chi" | |
- name: Commit files | |
run: | | |
git add -N . | |
if ! git diff --exit-code --quiet | |
then | |
git add . | |
git commit -m "Update data" -a | |
git pull --ff | |
git push origin master | |
fi |