cleanup old builds #893
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.12" | |
jobs: | |
cleanup: | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "checkout" | |
uses: "actions/[email protected]" | |
- name: "setup python ${{ env.PYTHON_VERSION }}" | |
uses: "actions/[email protected]" | |
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 "kyoripowered-deployment[bot]" | |
git config user.email "121842021+kyoripowered-deployment[bot]@users.noreply.github.com" | |
python _scripts/cleanup.py . | |
git commit -a -m 'cleanup outdated previews' || true | |
git push |