31 lines
840 B
YAML
31 lines
840 B
YAML
name: Prune branches
|
|
|
|
# Every night: remove feature/* and fix/* branches that nobody touched for 30 days and that have no
|
|
# open pull request. production, develop and the release branches are never removed.
|
|
on:
|
|
schedule:
|
|
- cron: '15 4 * * *'
|
|
workflow_dispatch:
|
|
inputs:
|
|
dry_run:
|
|
description: 'Only say what would be removed (1) or remove it (0)'
|
|
default: '1'
|
|
|
|
jobs:
|
|
prune:
|
|
runs-on: docker
|
|
container:
|
|
image: webdevops/php:8.4
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: remove quiet branches
|
|
run: python3 .gitea/scripts/prune_branches.py
|
|
env:
|
|
GT_URL: https://git.iriks.casa
|
|
GT_OWNER: iriks-it
|
|
GT_REPO: laravel-manager
|
|
GT_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
|
|
DRY_RUN: ${{ inputs.dry_run }}
|