[김희진] sprint8 #109
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 branch on close pr | |
on: | |
pull_request: | |
types: [closed] | |
jobs: | |
delete-branch: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Check if branch exists | |
id: check_branch | |
run: | | |
if git show-ref --verify --quiet refs/heads/${{ github.head_ref }}; then | |
echo "branch_exists=true" >> $GITHUB_ENV | |
else | |
echo "branch_exists=false" >> $GITHUB_ENV | |
fi | |
- name: Delete branch | |
if: env.branch_exists == 'true' | |
uses: SvanBoxel/delete-merged-branch@main | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |