cleanup old builds #147
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: "cleanup old builds" | |
on: | |
schedule: | |
- cron: '14 1 * * *' | |
workflow_dispatch: | |
env: | |
PYTHON_VERSION: "3.10" | |
jobs: | |
cleanup: | |
runs-on: "ubuntu-latest" | |
permissions: | |
contents: write | |
steps: | |
- name: "checkout" | |
uses: "actions/checkout@v3" | |
- name: "setup python ${{ env.PYTHON_VERSION }}" | |
uses: "actions/setup-python@v4" | |
with: | |
python-version: "${{ env.PYTHON_VERSION }}" | |
cache: "pip" | |
cache-dependency-path: "_scripts/requirements.txt" | |
- name: "install dependencies" | |
run: "pip install -r _scripts/requirements.txt" | |
- name: "cleanup old PRs" | |
run: | | |
git config user.name "vineflower-bot" | |
git config user.email "[email protected]" | |
python _scripts/cleanup.py . | |
git commit -a -m 'cleanup outdated previews' || true | |
git push |