This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new d501066b60f HDDS-15922. (addendum) Fix ozone-site config doc workflow
reusing stale PR branch (#10886)
d501066b60f is described below
commit d501066b60fdb64b5ea415282285ea46c5970871
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Tue Jul 28 17:45:41 2026 +0200
HDDS-15922. (addendum) Fix ozone-site config doc workflow reusing stale PR
branch (#10886)
---
.github/workflows/update-ozone-site-config-doc.yml | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/update-ozone-site-config-doc.yml
b/.github/workflows/update-ozone-site-config-doc.yml
index f90c2729c76..5bc9ea2ca01 100644
--- a/.github/workflows/update-ozone-site-config-doc.yml
+++ b/.github/workflows/update-ozone-site-config-doc.yml
@@ -60,7 +60,13 @@ jobs:
git config --global user.name 'github-actions[bot]'
git config --global user.email
'github-actions[bot]@users.noreply.github.com'
- git clone --depth=1 --branch=master
https://github.com/$REPO_OWNER/ozone-site.git ozone-site
+ BRANCH_EXISTS=""
+ if git clone --depth=1 --branch="$BRANCH_NAME"
https://github.com/$REPO_OWNER/ozone-site.git ozone-site; then
+ BRANCH_EXISTS="true"
+ else
+ git clone --depth=1 --branch=master
https://github.com/$REPO_OWNER/ozone-site.git ozone-site
+ fi
+
cd ozone-site
EXISTING_PR=$(gh pr list --repo "$REPO_OWNER/ozone-site" \
@@ -68,13 +74,14 @@ jobs:
echo "EXISTING_PR=$EXISTING_PR" >> $GITHUB_ENV
if [ -n "$EXISTING_PR" ]; then
- echo "Open PR #$EXISTING_PR exists, checking out branch for
comparison"
- git fetch --depth=1 origin "$BRANCH_NAME"
- git checkout -B "$BRANCH_NAME" FETCH_HEAD
+ echo "Open PR #$EXISTING_PR exists"
+ elif [[ -n "$BRANCH_EXISTS" ]]; then
+ echo "No open PR, but branch exists, resetting to master"
+ git fetch --depth 1 origin master:master
+ git reset --hard master
else
- echo "No open PR, creating branch from master"
- git fetch --depth=1 origin "$BRANCH_NAME" || true
- git checkout -B "$BRANCH_NAME" master
+ echo "No open PR or branch, creating from master"
+ git checkout -b "$BRANCH_NAME" master
fi
- name: Check if documentation changed
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]