Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mod branch cleanup #2301

Merged
merged 8 commits into from
Jan 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/cleanup_mod_branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
workflow_dispatch:

jobs:
mod:
cleanup:
runs-on: ubuntu-latest
timeout-minutes: 60

Expand All @@ -19,10 +19,16 @@ jobs:
run: echo '${{ toJSON(github) }}'

- uses: actions/checkout@v4
with:
fetch-depth: 0

- 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
for branch in $(git branch -a | grep "remotes/origin/mod-up-*" | cut -d '/' -f3)
do
echo $branch
git push --delete origin $branch
done