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 <[email protected]>
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 <[email protected]>
---
.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 "[email protected]"
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: [email protected]
For additional commands, e-mail: [email protected]