Skip to content

Commit 7856718

Browse files
committed
k
1 parent 3d9cc76 commit 7856718

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

.github/workflows/pr-backport-autotrigger.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,19 @@ jobs:
8181
set -e
8282
echo "Backporting to beta ${{ steps.list-branches.outputs.beta }} and stable ${{ steps.list-branches.outputs.stable }}"
8383
84+
# Echo the merge commit SHA
85+
echo "Merge commit SHA: ${{ github.event.pull_request.merge_commit_sha }}"
86+
8487
# Fetch all history for all branches and tags
8588
git fetch --prune
8689
87-
# Prepare the beta branch
90+
# Reset and prepare the beta branch
8891
git checkout ${{ steps.list-branches.outputs.beta }}
92+
echo "Last 5 commits on beta branch:"
93+
git log -n 5 --pretty=format:"%H"
94+
echo "" # Newline for formatting
95+
96+
# Cherry-pick the merge commit from the merged PR
8997
git cherry-pick -m 1 ${{ github.event.pull_request.merge_commit_sha }} || {
9098
echo "Cherry-pick to beta failed due to conflicts."
9199
exit 1
@@ -94,11 +102,15 @@ jobs:
94102
# Create new beta branch/tag
95103
git tag ${{ steps.list-branches.outputs.new_beta_tag }}
96104
# Push the changes and tag to the beta branch using PAT
97-
git push origin ${{ steps.list-branches.outputs.beta }} --force
98-
#git push origin ${{ steps.list-branches.outputs.new_beta_tag }} # This step does not trigger the workflow, better to do it manually for now
105+
git push origin ${{ steps.list-branches.outputs.beta }}
106+
#git push origin ${{ steps.list-branches.outputs.new_beta_tag }}
99107
100-
# Prepare the stable branch
108+
# Reset and prepare the stable branch
101109
git checkout ${{ steps.list-branches.outputs.stable }}
110+
echo "Last 5 commits on stable branch:"
111+
git log -n 5 --pretty=format:"%H"
112+
echo "" # Newline for formatting
113+
102114
# Cherry-pick the merge commit from the merged PR
103115
git cherry-pick -m 1 ${{ github.event.pull_request.merge_commit_sha }} || {
104116
echo "Cherry-pick to stable failed due to conflicts."
@@ -108,5 +120,5 @@ jobs:
108120
# Create new stable branch/tag
109121
git tag ${{ steps.list-branches.outputs.new_stable_tag }}
110122
# Push the changes and tag to the stable branch using PAT
111-
git push origin ${{ steps.list-branches.outputs.stable }} --force
112-
#git push origin ${{ steps.list-branches.outputs.new_stable_tag }} # This step does not trigger the workflow, better to do it manually for now
123+
git push origin ${{ steps.list-branches.outputs.stable }}
124+
#git push origin ${{ steps.list-branches.outputs.new_stable_tag }}

0 commit comments

Comments
 (0)