Skip to content

Commit b694c5a

Browse files
Tweak backport branch delete workflow to delete other merged branches (#6809)
* Tweak backport branch delete workflow to delete other merged branches Signed-off-by: Peter Zhu <[email protected]> * Add prevent condition due to SvanBoxel/delete-merged-branch#204 issues Signed-off-by: Peter Zhu <[email protected]> --------- Signed-off-by: Peter Zhu <[email protected]>
1 parent acdcc05 commit b694c5a

File tree

2 files changed

+22
-15
lines changed

2 files changed

+22
-15
lines changed

Diff for: .github/workflows/delete_backport_branch.yml

-15
This file was deleted.

Diff for: .github/workflows/delete_merged_branch.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Delete merged branch of the PRs
2+
on:
3+
pull_request:
4+
types:
5+
- closed
6+
7+
jobs:
8+
delete-branch:
9+
runs-on: ubuntu-latest
10+
if: |
11+
startsWith(github.event.pull_request.head.repo.full_name, 'opensearch-project/documentation-website') &&
12+
startsWith(! github.event.pull_request.head.ref, 'main') &&
13+
startsWith(! github.event.pull_request.head.ref, '1.') &&
14+
startsWith(! github.event.pull_request.head.ref, '2.') &&
15+
startsWith(! github.event.pull_request.head.ref, 'version/')
16+
steps:
17+
- name: Echo remove branch
18+
run: echo Removing ${{github.event.pull_request.head.ref}}
19+
- name: Delete merged branch
20+
uses: SvanBoxel/delete-merged-branch@main
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)