Skip to content

Commit

Permalink
Add prevent condition due to SvanBoxel/delete-merged-branch#204 issues
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <[email protected]>
  • Loading branch information
peterzhuamazon committed Mar 28, 2024
1 parent a36e42f commit ef3d9fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/delete_backport_branch.yml

This file was deleted.

7 changes: 6 additions & 1 deletion .github/workflows/delete_merged_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ on:
jobs:
delete-branch:
runs-on: ubuntu-latest
if: startsWith(github.event.pull_request.head.repo.full_name, 'opensearch-project/documentation-website')
if: |
startsWith(github.event.pull_request.head.repo.full_name, 'opensearch-project/documentation-website') &&
startsWith(! github.event.pull_request.head.ref, 'main') &&
startsWith(! github.event.pull_request.head.ref, '1.') &&
startsWith(! github.event.pull_request.head.ref, '2.') &&
startsWith(! github.event.pull_request.head.ref, 'version/')
steps:
- name: Echo remove branch
run: echo Removing ${{github.event.pull_request.head.ref}}
Expand Down

0 comments on commit ef3d9fd

Please sign in to comment.