Skip to content

Commit

Permalink
Try and get deleted branch name properly
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenj committed Jan 30, 2023
1 parent 51cbc34 commit 4d01562
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/branch-delete-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ jobs:
steps:
- name: Set env
run: |
env
GIT_BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
echo "GIT_BRANCH=$GIT_BRANCH" >> $GITHUB_ENV
echo "::set-env name=GIT_BRANCH::${{ github.event.ref }}"
GIT_BRANCH=$(echo $GIT_BRANCH | sed -e "s#refs/heads/##g")
echo "GIT_BRANCH=$GIT_BRANCH" >> $GITHUB_ENV
echo "github.event.ref is ${{ github.event.ref }}"
echo "branch deleted is $GIT_BRANCH"
- name: Clean up
run: |
Expand Down

0 comments on commit 4d01562

Please sign in to comment.