From 4e13689b2417c1cb7ee5b1067701af995bdd8642 Mon Sep 17 00:00:00 2001 From: Kasem Alem Date: Thu, 5 Sep 2024 18:45:57 +0300 Subject: [PATCH] feat(KONFLUX-2688): add github action to delete old brances Signed-off-by: Kasem Alem --- .github/workflows/delete-old-branches.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/delete-old-branches.yml diff --git a/.github/workflows/delete-old-branches.yml b/.github/workflows/delete-old-branches.yml new file mode 100644 index 0000000000..51da738ad6 --- /dev/null +++ b/.github/workflows/delete-old-branches.yml @@ -0,0 +1,20 @@ +name: Cleanup old branches +on: + schedule: + - cron: "0 0 * * 0" + workflow_dispatch: +jobs: + housekeeping: + name: Cleanup old branches + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Run delete-old-branches-action + uses: beatlabs/delete-old-branches-action@v0.0.10 + with: + repo_token: ${{ github.token }} + date: '1 week ago' + dry_run: true + extra_protected_branch_regex: ^(main)$ + exclude_open_pr_branches: false