From 2e680149177b234a740835283edeb82f3a16122f Mon Sep 17 00:00:00 2001 From: Sai Saran Vaidyanathan Date: Wed, 6 Nov 2024 12:26:05 -0800 Subject: [PATCH] fix: use short SHA in branch creation --- .github/workflows/gen-docs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/gen-docs.yml b/.github/workflows/gen-docs.yml index 1f542bbb..51ca8ac2 100644 --- a/.github/workflows/gen-docs.yml +++ b/.github/workflows/gen-docs.yml @@ -31,12 +31,13 @@ jobs: uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 #v4 - name: Push GH Pages run: | + SHORT_SHA=$(git rev-parse --short $GITHUB_SHA) git config pull.rebase false git config --global user.name "$(git log -n 1 --pretty=format:%an)" git config --global user.email "$(git log -n 1 --pretty=format:%ae)" git pull origin main --allow-unrelated-histories - git checkout -b docs_$GITHUB_SHA + git checkout -b docs_$SHORT_SHA GOBIN=/tmp/ go install github.com/google/go-licenses@v1.0.0 /tmp/go-licenses csv ./cmd/apigeecli > third-party-licenses.txt || echo "Ignore warnings"