@@ -81,11 +81,19 @@ jobs:
81
81
set -e
82
82
echo "Backporting to beta ${{ steps.list-branches.outputs.beta }} and stable ${{ steps.list-branches.outputs.stable }}"
83
83
84
+ # Echo the merge commit SHA
85
+ echo "Merge commit SHA: ${{ github.event.pull_request.merge_commit_sha }}"
86
+
84
87
# Fetch all history for all branches and tags
85
88
git fetch --prune
86
89
87
- # Prepare the beta branch
90
+ # Reset and prepare the beta branch
88
91
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
89
97
git cherry-pick -m 1 ${{ github.event.pull_request.merge_commit_sha }} || {
90
98
echo "Cherry-pick to beta failed due to conflicts."
91
99
exit 1
@@ -94,11 +102,15 @@ jobs:
94
102
# Create new beta branch/tag
95
103
git tag ${{ steps.list-branches.outputs.new_beta_tag }}
96
104
# 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 }}
99
107
100
- # Prepare the stable branch
108
+ # Reset and prepare the stable branch
101
109
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
+
102
114
# Cherry-pick the merge commit from the merged PR
103
115
git cherry-pick -m 1 ${{ github.event.pull_request.merge_commit_sha }} || {
104
116
echo "Cherry-pick to stable failed due to conflicts."
@@ -108,5 +120,5 @@ jobs:
108
120
# Create new stable branch/tag
109
121
git tag ${{ steps.list-branches.outputs.new_stable_tag }}
110
122
# 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