PTL-1778: patch releases 8.2.10 and 8.6.7 #382
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Delete Branches on PR Close | |
on: | |
pull_request: | |
types: | |
- closed | |
jobs: | |
delete-branch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Check if PR was merged | |
id: pr-merged | |
run: echo "PR_MERGED=${{ github.event.pull_request.merged }}" >> $GITHUB_ENV | |
- name: Delete branch | |
if: env.PR_MERGED == 'false' | |
run: | | |
# Get the branch name from the pull request | |
BRANCH_NAME=$(echo "${{ github.event.pull_request.head.ref }}") | |
# Delete the branch | |
git push origin --delete "$BRANCH_NAME" |