From 4952c2dcfbd95536560691b12c03371b66815357 Mon Sep 17 00:00:00 2001 From: Steven Powell Date: Fri, 29 Mar 2024 11:16:59 -0700 Subject: [PATCH] CI: Update docsy PR title to include version --- .github/workflows/update-docsy-version.yml | 6 +++--- Makefile | 4 ++-- hack/update/docsy_version/update_docsy_version.go | 6 ++++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/update-docsy-version.yml b/.github/workflows/update-docsy-version.yml index f5ed52d6de..da325866e4 100644 --- a/.github/workflows/update-docsy-version.yml +++ b/.github/workflows/update-docsy-version.yml @@ -22,7 +22,7 @@ jobs: - name: Bump Docsy version id: bumpDocsy run: | - make update-docsy-version + echo "NEW_VERSION=$(make update-docsy-version)" >> "$GITHUB_OUTPUT" # The following is to support multiline with GITHUB_OUTPUT, see https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#multiline-strings echo "changes<> "$GITHUB_OUTPUT" echo "$(git status --porcelain)" >> "$GITHUB_OUTPUT" @@ -32,14 +32,14 @@ jobs: uses: peter-evans/create-pull-request@70a41aba780001da0a30141984ae2a0c95d8704e with: token: ${{ secrets.MINIKUBE_BOT_PAT }} - commit-message: bump docsy version + commit-message: 'site: Update docsy version to ${{ steps.bumpDocsy.outputs.NEW_VERSION }}' committer: minikube-bot author: minikube-bot branch: auto_bump_docsy_version push-to-fork: minikube-bot/minikube base: master delete-branch: true - title: 'bump docsy version' + title: 'site: Update docsy version to ${{ steps.bumpDocsy.outputs.NEW_VERSION }}' body: | Docsy project released a [new version](https://github.com/google/docsy/releases), diff --git a/Makefile b/Makefile index 6538b5bbbb..b36ab23c32 100644 --- a/Makefile +++ b/Makefile @@ -1060,8 +1060,8 @@ update-gh-version: .PHONY: update-docsy-version update-docsy-version: - (cd hack/update/docsy_version && \ - go run update_docsy_version.go) + @(cd hack/update/docsy_version && \ + go run update_docsy_version.go) .PHONY: update-hugo-version update-hugo-version: diff --git a/hack/update/docsy_version/update_docsy_version.go b/hack/update/docsy_version/update_docsy_version.go index e6ed60fd37..8c59ea5f43 100644 --- a/hack/update/docsy_version/update_docsy_version.go +++ b/hack/update/docsy_version/update_docsy_version.go @@ -18,6 +18,7 @@ package main import ( "context" + "fmt" "os/exec" "time" @@ -39,11 +40,12 @@ func main() { // get Docsy stable version stable, err := update.StableVersion(ctx, "google", "docsy") if err != nil { - klog.Fatalf("Unable to get Doscy stable version: %v", err) + klog.Fatalf("Unable to get Docsy stable version: %v", err) } - klog.Infof("Doscy stable version: %s", stable) if err := exec.CommandContext(ctx, "./update_docsy_version.sh", stable).Run(); err != nil { klog.Fatalf("failed to update docsy commit: %v", err) } + + fmt.Print(stable) }