Merge pull request #18541 from spowelljr/updateDocsyPRTitle

CI: Update docsy PR title to include version
pull/18565/head
Medya Ghazizadeh 2024-04-02 10:49:32 -07:00 committed by GitHub
commit eea74a63c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 7 deletions

View File

@ -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<<EOF" >> "$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 <minikube-bot@google.com>
author: minikube-bot <minikube-bot@google.com>
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),

View File

@ -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:

View File

@ -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)
}