Skip to content

Commit

Permalink
chore: remember on which git branch we started
Browse files Browse the repository at this point in the history
  • Loading branch information
lpm0073 committed Nov 17, 2023
1 parent c1ca988 commit 2081d10
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/actions/merge-branch/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ runs:
fetch-depth: 0
persist-credentials: false

- name: Remember current branch
run: echo "CURRENT_BRANCH=$(git branch --show-current)" >> $GITHUB_ENV

- name: Merge
id: merge
shell: bash
Expand All @@ -46,3 +49,8 @@ runs:
git checkout ${{ inputs.target-branch }}
git merge -Xtheirs ${{ inputs.source-branch }}
git push https://${{ inputs.github-token }}@github.com/${{ github.repository }}.git HEAD:${{ inputs.target-branch }}
- name: Checkout current branch
shell: bash
run: |
git checkout ${{ env.CURRENT_BRANCH }}

0 comments on commit 2081d10

Please sign in to comment.