The above workflow file deletes the stale branches every month on the day 1 & provides options to delete stale branches by filtering branches being stale for months.
Used the existing github action & tweaked it
@beatlabs/delete-old-branches-action
*Just download the cleaner.yml and configure in your repos, note if you have enterprise subscription of github you can apply this cleaner in organisation level *