Skip to content

Clean up mod branches #1

Clean up mod branches

Clean up mod branches #1

name: Clean up mod branches
on:
schedule:
- cron: '15 21 * * *' # 12:15(JST)
workflow_dispatch:
jobs:
mod:
runs-on: ubuntu-latest
timeout-minutes: 60
permissions:
contents: write
steps:
- name: Dump GitHub context
id: github_context_step
run: echo '${{ toJSON(github) }}'
- uses: actions/checkout@v4
- name: Clean up mod branches
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
for branch in $(git branch -a | grep -e "remotes/origin/mod-up-*" | cut -d '/' -f3); do; echo $branch; git push --delete origin $branch;done