Skip to content

Commit

Permalink
Merge pull request kubernetes#14267 from spowelljr/updateWorkflows
Browse files Browse the repository at this point in the history
CI: Automate updating kubectl version
  • Loading branch information
spowelljr authored Jun 8, 2022
2 parents 2f3a851 + 022e7bf commit 454816a
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/functional_verified.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
- name: Install kubectl
shell: bash
run: |
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.18.0/bin/linux/arm64/kubectl
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/arm64/kubectl"
sudo install kubectl /usr/local/bin/kubectl
kubectl version --client=true
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/leaderboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
release:
types: [published]
env:
GOPROXY: https://proxy.golang.org
GO_VERSION: '1.18.2'
permissions:
contents: read
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
- name: Install kubectl
shell: bash
run: |
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.18.0/bin/linux/amd64/kubectl
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install kubectl /usr/local/bin/kubectl
kubectl version --client=true
- name: Docker Info
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
- name: Install kubectl
shell: bash
run: |
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.18.0/bin/linux/amd64/kubectl
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install kubectl /usr/local/bin/kubectl
kubectl version --client=true
- name: Docker Info
Expand Down Expand Up @@ -303,7 +303,7 @@ jobs:
- name: Install kubectl
shell: bash
run: |
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.18.0/bin/linux/amd64/kubectl
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install kubectl /usr/local/bin/kubectl
kubectl version --client=true
Expand Down Expand Up @@ -406,7 +406,7 @@ jobs:
- name: Install kubectl
shell: bash
run: |
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.18.0/bin/darwin/amd64/kubectl
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl"
sudo install kubectl /usr/local/bin/kubectl
kubectl version --client=true
- uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923
Expand Down Expand Up @@ -505,7 +505,7 @@ jobs:
- name: Install kubectl
shell: bash
run: |
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.18.0/bin/linux/amd64/kubectl
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install kubectl /usr/local/bin/kubectl
kubectl version --client=true
# conntrack is required for kubernetes 1.18 and higher
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
- name: Install kubectl
shell: bash
run: |
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.18.0/bin/linux/amd64/kubectl
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install kubectl /usr/local/bin/kubectl
kubectl version --client=true
- name: Docker Info
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:
- name: Install kubectl
shell: bash
run: |
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.18.0/bin/linux/amd64/kubectl
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install kubectl /usr/local/bin/kubectl
kubectl version --client=true
- name: Docker Info
Expand Down Expand Up @@ -302,7 +302,7 @@ jobs:
- name: Install kubectl
shell: bash
run: |
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.18.0/bin/linux/amd64/kubectl
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install kubectl /usr/local/bin/kubectl
kubectl version --client=true
Expand Down Expand Up @@ -406,7 +406,7 @@ jobs:
- name: Install kubectl
shell: bash
run: |
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.18.0/bin/darwin/amd64/kubectl
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl"
sudo install kubectl /usr/local/bin/kubectl
kubectl version --client=true
- uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923
Expand Down Expand Up @@ -506,7 +506,7 @@ jobs:
- name: Install kubectl
shell: bash
run: |
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.18.0/bin/linux/amd64/kubectl
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install kubectl /usr/local/bin/kubectl
kubectl version --client=true
# conntrack is required for kubernetes 1.18 and higher
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/sync-minikube.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Sync docker images of minikube to Alibaba Cloud

on:
workflow_dispatch:
schedule:
# every day at 7am & 7pm pacific
- cron: "0 2,14 * * *"

env:
GOPROXY: https://proxy.golang.org
GO_VERSION: '1.18.2'
permissions:
contents: read

Expand All @@ -24,7 +25,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923
with:
go-version: 1.17
go-version: ${{env.GO_VERSION}}

- name: Build
run: make
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/time-to-k8s-public-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Install kubectl
shell: bash
run: |
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.18.0/bin/darwin/amd64/kubectl
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl"
sudo install kubectl /usr/local/bin/kubectl
kubectl version --client=true
- uses: actions/setup-go@b22fbbc2921299758641fab08929b4ac52b32923
Expand Down
5 changes: 5 additions & 0 deletions hack/update/golang_version/update_golang_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ var (
`GO_VERSION: .*`: `GO_VERSION: '{{.StableVersion}}'`,
},
},
".github/workflows/sync-minikube.yml": {
Replace: map[string]string{
`GO_VERSION: .*`: `GO_VERSION: '{{.StableVersion}}'`,
},
},
"go.mod": {
Replace: map[string]string{
`(?m)^go .*`: `go {{.StableVersionMM}}`,
Expand Down

0 comments on commit 454816a

Please sign in to comment.