Skip to content

Commit

Permalink
[YUNIKORN-2968] handle no content changes in auto-publish (#501)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
wilfred-s committed Nov 12, 2024
1 parent f5c4532 commit 22eba9b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/auto-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 22eba9b

Please sign in to comment.