add a bot to bump golang version atuomatically
parent
a637a94002
commit
e883950d77
|
|
@ -0,0 +1,43 @@
|
|||
name: "update-golang-versions"
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# every Monday at around 2 am pacific/9 am UTC
|
||||
- cron: "0 9 * * 1"
|
||||
env:
|
||||
GOPROXY: https://proxy.golang.org
|
||||
GO_VERSION: 1.16.4
|
||||
jobs:
|
||||
bump-k8s-versions:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: ${{env.GO_VERSION}}
|
||||
stable: true
|
||||
- name: Bump Golang Versions
|
||||
id: bumGolang
|
||||
run: |
|
||||
make update-golang-version
|
||||
echo "::set-output name=changes::$(git status --porcelain)"
|
||||
- name: Create PR
|
||||
if: ${{ steps.bumpGolang.outputs.changes != '' }}
|
||||
uses: peter-evans/create-pull-request@v3
|
||||
with:
|
||||
token: ${{ secrets.MINIKUBE_BOT_PAT }}
|
||||
commit-message: bump golang versions
|
||||
committer: minikube-bot <minikube-bot@google.com>
|
||||
author: minikube-bot <minikube-bot@google.com>
|
||||
branch: auto_bump_golang_version
|
||||
push-to-fork: minikube-bot/minikube
|
||||
base: master
|
||||
delete-branch: true
|
||||
title: 'bump golang version'
|
||||
labels: ok-to-test
|
||||
body: |
|
||||
This PR was auto-generated by `make update-golang-version` using [update-golang-versions.yml](https://github.com/kubernetes/minikube/tree/master/.github/workflows/update-golang-version.yml) CI Workflow.
|
||||
Please only merge if all the tests pass and if kubernetes pushed an image for this golang https://github.com/kubernetes/kubernetes/blob/master/build/build-image/cross/VERSION
|
||||
|
||||
${{ steps.bumpk8s.outputs.changes }}
|
||||
|
||||
8
Makefile
8
Makefile
|
|
@ -32,7 +32,7 @@ RPM_VERSION ?= $(DEB_VERSION)
|
|||
RPM_REVISION ?= 0
|
||||
|
||||
# used by hack/jenkins/release_build_and_upload.sh and KVM_BUILD_IMAGE, see also BUILD_IMAGE below
|
||||
GO_VERSION ?= 1.16.4
|
||||
GO_VERSION ?= 1.16.6
|
||||
|
||||
# replace "x.y.0" => "x.y". kube-cross and golang.org/dl use different formats for x.y.0 go versions
|
||||
KVM_GO_VERSION ?= $(GO_VERSION:.0=)
|
||||
|
|
@ -958,6 +958,12 @@ help:
|
|||
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
||||
|
||||
|
||||
|
||||
.PHONY: update-golang-version
|
||||
update-golang-version:
|
||||
(cd hack/update/golang_version && \
|
||||
go run update_golang_version.go)
|
||||
|
||||
.PHONY: update-kubernetes-version
|
||||
update-kubernetes-version:
|
||||
(cd hack/update/kubernetes_version && \
|
||||
|
|
|
|||
|
|
@ -80,7 +80,17 @@ var (
|
|||
`GO_VERSION: '.*`: `GO_VERSION: '{{.StableVersion}}'`,
|
||||
},
|
||||
},
|
||||
".github/workflows/update_k8s_versions.yml": {
|
||||
".github/workflows/update-k8s-versions.yml": {
|
||||
Replace: map[string]string{
|
||||
`GO_VERSION: '.*`: `GO_VERSION: '{{.StableVersion}}'`,
|
||||
},
|
||||
},
|
||||
".github/workflows/update-golang-version.yml": {
|
||||
Replace: map[string]string{
|
||||
`GO_VERSION: '.*`: `GO_VERSION: '{{.StableVersion}}'`,
|
||||
},
|
||||
},
|
||||
".github/workflows/time-to-k8s-public-chart.yml": {
|
||||
Replace: map[string]string{
|
||||
`GO_VERSION: '.*`: `GO_VERSION: '{{.StableVersion}}'`,
|
||||
},
|
||||
|
|
@ -90,17 +100,6 @@ var (
|
|||
`GO_VERSION: '.*`: `GO_VERSION: '{{.StableVersion}}'`,
|
||||
},
|
||||
},
|
||||
".github/workflows/time-to-k8s-public-chart.yaml": {
|
||||
Replace: map[string]string{
|
||||
`GO_VERSION: '.*`: `GO_VERSION: '{{.StableVersion}}'`,
|
||||
},
|
||||
},
|
||||
".travis.yml": {
|
||||
Replace: map[string]string{
|
||||
`go:\n - .*`: `go:{{printf "\n - %s" .StableVersion}}`,
|
||||
`go: .*`: `go: {{.StableVersion}}`,
|
||||
},
|
||||
},
|
||||
"go.mod": {
|
||||
Replace: map[string]string{
|
||||
`(?m)^go .*`: `go {{.StableVersionMM}}`,
|
||||
|
|
@ -113,7 +112,8 @@ var (
|
|||
},
|
||||
"Makefile": {
|
||||
Replace: map[string]string{
|
||||
`GO_VERSION \?= .*`: `GO_VERSION ?= {{.StableVersion}}`,
|
||||
// searching for 1.* so it does NOT match "KVM_GO_VERSION ?= $(GO_VERSION:.0=)" in the Makefile
|
||||
`GO_VERSION \?= 1.*`: `GO_VERSION ?= {{.StableVersion}}`,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue