Merge pull request #13222 from klaases/kver1
CI: Print PR title from Go for Github Action.pull/12996/head
commit
6d2dfad35c
|
@ -19,7 +19,9 @@ jobs:
|
|||
- name: Bump Kuberenetes Versions
|
||||
id: bumpk8s
|
||||
run: |
|
||||
make update-kubernetes-version
|
||||
t=$(make update-kubernetes-version)
|
||||
t=$(echo $t | head -n 1)
|
||||
echo "::set-output name=title::$t"
|
||||
c=$(git status --porcelain)
|
||||
c="${c//$'\n'/'%0A'}"
|
||||
c="${c//$'\r'/'%0D'}"
|
||||
|
@ -36,13 +38,12 @@ jobs:
|
|||
push-to-fork: minikube-bot/minikube
|
||||
base: master
|
||||
delete-branch: true
|
||||
title: 'bump default/newest kubernetes versions'
|
||||
title: "${{ steps.bumpk8s.outputs.title }}"
|
||||
labels: ok-to-test
|
||||
body: |
|
||||
This PR was auto-generated by `make update-kubernetes-version` using [update-k8s-versions.yml](https://github.com/kubernetes/minikube/tree/master/.github/workflows) CI Workflow.
|
||||
Please only merge if all the tests pass.
|
||||
|
||||
|
||||
```
|
||||
${{ steps.bumpk8s.outputs.changes }}
|
||||
```
|
||||
|
||||
|
|
2
Makefile
2
Makefile
|
@ -978,7 +978,7 @@ update-golang-version:
|
|||
|
||||
.PHONY: update-kubernetes-version
|
||||
update-kubernetes-version:
|
||||
(cd hack/update/kubernetes_version && \
|
||||
@(cd hack/update/kubernetes_version && \
|
||||
go run update_kubernetes_version.go)
|
||||
|
||||
.PHONY: update-golint-version
|
||||
|
|
|
@ -28,6 +28,7 @@ package main
|
|||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"golang.org/x/mod/semver"
|
||||
|
@ -137,7 +138,9 @@ func main() {
|
|||
klog.Fatalf("Unable to get Kubernetes versions: %v", err)
|
||||
}
|
||||
data := Data{StableVersion: stable, LatestVersion: latest, LatestVersionMM: latestMM, LatestVersionP0: latestP0}
|
||||
klog.Infof("Kubernetes versions: 'stable' is %s and 'latest' is %s", data.StableVersion, data.LatestVersion)
|
||||
|
||||
// Print PR title for Github action.
|
||||
fmt.Printf("Bump Kubernetes version default: %s and latest: %s\n", data.StableVersion, data.LatestVersion)
|
||||
|
||||
update.Apply(ctx, schema, data, prBranchPrefix, prTitle, prIssue)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue