Skip to content

fetch-booru-data

fetch-booru-data #105

name: fetch-booru-data
on:
schedule:
- cron: '23 16 15 * *'
jobs:
fetch:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/[email protected]
- name: Set up python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Poetry
uses: snok/[email protected]
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Fetch data
env:
BOORU_BOT_USER: ${{ secrets.BOORU_BOT_USER }}
BOORU_BOT_PASS: ${{ secrets.BOORU_BOT_PASS }}
run: |
poetry run python fetch.py
- name: Make pull request
uses: peter-evans/create-pull-request@v6
with:
add-paths: stats/static/js/data
branch: fetch-data
commit-message: "Update data from TWI Fanworks API"
title: "Update data from TWI Fanworks API"