auto bump kubernetes version using github actions

pull/11863/head
Medya Gh 2021-07-01 16:32:39 -04:00
parent 05b64d1a74
commit d2876b1414
2 changed files with 41 additions and 0 deletions

View File

@ -0,0 +1,36 @@
name: "update-kubernetes-versions"
on:
schedule:
# every week on Thursday at 20:30 UTC
- cron: "45 20 * * *"
env:
GOPROXY: https://proxy.golang.org
GO_VERSION: 1.16.4
jobs:
generate-docs:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{env.GO_VERSION}}
stable: true
- name: Bump Kuberenetes Versions
id: bumpk8s
run: |
make update-kubernetes-version
echo "::set-output name=changes::$(git status --porcelain)"
- name: Create PR
if: ${{ steps.bumpk8s.outputs.changes != '' }}
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.MINIKUBE_BOT_PAT }}
commit-message: bump default/newest kubernetes versions
committer: minikube-bot <minikube-bot@google.com>
author: minikube-bot <minikube-bot@google.com>
branch: auto_bump_k8s_versions
push-to-fork: minikube-bot/minikube
base: master
delete-branch: true
title: 'bump default/newest kubernetes versions'
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.\n\n${{ steps.bumpk8s.outputs.changes }}'

View File

@ -75,6 +75,11 @@ var (
`GO_VERSION: '.*`: `GO_VERSION: '{{.StableVersion}}'`,
},
},
".github/workflows/update_k8s_versions.yml": {
Replace: map[string]string{
`GO_VERSION: '.*`: `GO_VERSION: '{{.StableVersion}}'`,
},
},
".github/workflows/pr_verified.yaml": {
Replace: map[string]string{
`GO_VERSION: '.*`: `GO_VERSION: '{{.StableVersion}}'`,