You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@yunikorn.apache.org by wi...@apache.org on 2024/11/12 02:44:01 UTC

(yunikorn-site) branch master updated: [YUNIKORN-2968] handle no content changes in auto-publish (#501)

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

wilfreds pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yunikorn-site.git


The following commit(s) were added to refs/heads/master by this push:
     new 22eba9bdd6 [YUNIKORN-2968] handle no content changes in auto-publish (#501)
22eba9bdd6 is described below

commit 22eba9bdd6c58d842501fc9453994367a20d1d22
Author: Wilfred Spiegelenburg <wi...@apache.org>
AuthorDate: Tue Nov 12 13:43:40 2024 +1100

    [YUNIKORN-2968] handle no content changes in auto-publish (#501)
    
    Any push to master will still trigger a build. That workflow will fail
    if it has nothing to commit into the asf-site branch. If there is no
    change in the content of the website we should just exit and let the
    build pass.
    
    Closes: #501
    
    Signed-off-by: Wilfred Spiegelenburg <wi...@apache.org>
---
 .github/workflows/auto-publish.yml | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/auto-publish.yml b/.github/workflows/auto-publish.yml
index 637ebf9a06..4cf231b07e 100644
--- a/.github/workflows/auto-publish.yml
+++ b/.github/workflows/auto-publish.yml
@@ -53,5 +53,9 @@ jobs:
           git config --local user.email "yunikornscheduler@gmail.com"
           git config --local user.name "yunikorn-bot"
           git add .
-          git commit -aF ../asf-site-commit.txt
-          git push
+          if output=$(git status --porcelain) && [ -z "$output" ]; then
+            echo "nothing changed, skipping commit"
+          else
+            git commit -aF ../asf-site-commit.txt
+            git push
+          fi


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: issues-help@yunikorn.apache.org