Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
buffalojoec committed Dec 4, 2024
1 parent 461510a commit 5fd85d8
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/actions/backport/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ runs:
else
echo "No backport detected."
fi
- name: Checkout base branch
if : ${{ env.BACKPORT == 'true' }}
uses: actions/checkout@v4
with:
ref: ${{ inputs.base_branch }}
- name: Backport changes
if: ${{ env.BACKPORT == 'true' }}
Expand All @@ -52,6 +46,14 @@ runs:
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git fetch --all
BASE_BRANCH="${{ inputs.base_branch }}"
BACKPORT_BRANCH="backport-${{ env.PR_NUMBER }}-to-${{ inputs.base_branch }}"
git checkout $BASE_BRANCH
git pull origin $BASE_BRANCH
git checkout -b $BACKPORT_BRANCH
BACKPORT_BRANCH="backport-${{ env.PR_NUMBER }}-to-${{ inputs.base_branch }}"
git checkout -b $BACKPORT_BRANCH
Expand Down

0 comments on commit 5fd85d8

Please sign in to comment.