CLEAR OLD BRANCHES #4
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: CLEAR OLD BRANCHES | |
on: | |
workflow_dispatch: | |
inputs: | |
daysAgo: | |
description: 'Delete branches updated' | |
required: true | |
default: '3 months ago' | |
type: choice | |
options: | |
- 1 month ago | |
- 2 months ago | |
- 3 months ago | |
- 4 months ago | |
- 5 months ago | |
- 1 year ago | |
schedule: | |
- cron: "0 0 1 * *" | |
jobs: | |
cleaning: | |
name: Cleanup old branches | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: clean | |
uses: beatlabs/[email protected] | |
with: | |
repo_token: ${{ github.token }} | |
date: ${{ inputs.daysAgo }} | |
dry_run: false | |
delete_tags: false | |
minimum_tags: 5 | |
extra_protected_branch_regex: master.*|main|develop|^poc.*|.*_p$ |