This is an automated email from the ASF dual-hosted git repository.

rubenada pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/calcite.git


The following commit(s) were added to refs/heads/main by this push:
     new ed9fceed66 [CALCITE-5584] Publish website action only triggers for the 
last commit in the chain
ed9fceed66 is described below

commit ed9fceed66aed87756f0db2115ddf8757b39254b
Author: Ruben Quesada Lopez <[email protected]>
AuthorDate: Fri Jul 31 16:27:34 2026 +0200

    [CALCITE-5584] Publish website action only triggers for the last commit in 
the chain
---
 .../publish-non-release-website-updates.yml        | 23 ++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/publish-non-release-website-updates.yml 
b/.github/workflows/publish-non-release-website-updates.yml
index c72a64233f..0dde26d764 100644
--- a/.github/workflows/publish-non-release-website-updates.yml
+++ b/.github/workflows/publish-non-release-website-updates.yml
@@ -35,15 +35,26 @@ jobs:
         with:
           fetch-depth: 0
           ref: site
-      - name: Cherry pick the commit to site
+      - name: Cherry pick all commits in push to site
+        env:
+          COMMITS: ${{ toJson(github.event.commits) }}
         run: |
           git config user.email ${{ github.actor }}@users.noreply.github.com
           git config user.name ${{ github.actor }}
-          git cherry-pick --strategy=recursive -X theirs $GITHUB_SHA
-          if [ $? -neq 0 ]; then
-            git status | sed -n 's/deleted by us://p' | xargs git add
-            git cherry-pick --continue --no-edit
-          fi
+
+          # Extract each commit SHA from the push payload and iterate 
chronologically
+          echo "$COMMITS" | jq -r '.[].id' | while read -r commit_sha; do
+            echo "----------------------------------------"
+            echo "Cherry-picking commit: $commit_sha"
+            echo "----------------------------------------"
+
+            if ! git cherry-pick --strategy=recursive -X theirs "$commit_sha"; 
then
+              echo "Handling cherry-pick conflict..."
+              git status | sed -n 's/deleted by us://p' | xargs -r git add
+              git cherry-pick --continue --no-edit
+            fi
+          done
+
           git push origin site
 
   publish-website:

Reply via email to