From 9fc9ef49930c4852c0930f3551b7e8cc3dbcdadb Mon Sep 17 00:00:00 2001 From: Shivam Goyal Date: Mon, 13 Jan 2025 16:31:00 +0530 Subject: [PATCH] NTP-1234 | GHA | Delete Stale Branches (#14483) --- .github/workflows/delete-stale-branches.yml | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/delete-stale-branches.yml diff --git a/.github/workflows/delete-stale-branches.yml b/.github/workflows/delete-stale-branches.yml new file mode 100644 index 0000000000..e83bf48828 --- /dev/null +++ b/.github/workflows/delete-stale-branches.yml @@ -0,0 +1,23 @@ +name: Delete Stale Branches + +on: + workflow_dispatch: + schedule: + - cron: "30 4 * * TUE" + +jobs: + delete-stale-branches: + runs-on: [ default ] + steps: + - name: Create GitHub App Token + uses: navi-synced-actions/actions-create-github-app-token@v1 + id: get-token + with: + private-key: ${{ secrets.GH_APP_NAVI_ANDROID_PEM }} + app-id: ${{ secrets.GH_APP_NAVI_ANDROID_ID }} + - name: Delete Stale Branches + uses: navi-synced-actions/balvajs-delete-stale-branches@v2 + with: + token: ${{ steps.get-token.outputs.token }} + days-to-delete: 180 + dry-run: false