Skip to content

Commit 38cf537

Browse files
Merge pull request #636 from devanshuVmware/cve-fixes
[v0.19.x] Bump golang and fix workflows
2 parents 58c8455 + c218b5c commit 38cf537

File tree

7 files changed

+55
-29
lines changed

7 files changed

+55
-29
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ jobs:
1818
name: lint
1919
runs-on: ubuntu-latest
2020
steps:
21-
- name: Set up Go 1.x
22-
uses: actions/setup-go@v3
21+
- uses: actions/checkout@v4
2322
with:
24-
go-version: 1.23.6
25-
- uses: actions/[email protected]
23+
fetch-depth: 0
24+
- name: Set up Go 1.x
25+
uses: actions/setup-go@v5
2626
with:
27-
fetch-depth: '0'
27+
go-version-file: go.mod
2828
- name: golangci-lint
2929
uses: golangci/[email protected]
3030
with:

.github/workflows/kind-action.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Create k8s Kind Cluster
22-
uses: helm/kind-action@v1.2.0
22+
uses: helm/kind-action@v1
2323
with:
24-
version: v0.13.0
25-
kubectl_version: v1.24.0
2624
cluster_name: kinder
27-
- uses: actions/checkout@v2
25+
- name: Check out code into the Go module directory
26+
uses: actions/checkout@v4
2827
with:
2928
fetch-depth: 0
30-
- uses: actions/setup-go@v3 # default version of go is 1.10
29+
- name: Set up go
30+
uses: actions/setup-go@v5
3131
with:
32-
go-version: 1.23.6
32+
go-version-file: go.mod
3333
- name: Install Carvel Tools
3434
uses: carvel-dev/setup-action@v2
3535
with:
@@ -42,7 +42,7 @@ jobs:
4242
- name: Install sg and run e2e tests on kind
4343
run: |
4444
set -e -x
45-
kubectl version --short
45+
kubectl version
4646
4747
ytt -f config/package-bundle/config -f config/dev | kbld -f- > kbld.out 2> kbldmeta.out
4848
cat kbldmeta.out | tail -n 1 | sed 's/.*final: secretgen-controller -> \(.*\)$/\1/p' | tail -n 1 | xargs kind load docker-image --name kinder

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ jobs:
1414
id-token: write
1515
steps:
1616
- name: Checkout
17-
uses: actions/checkout@v2
17+
uses: actions/checkout@v4
1818
with:
1919
fetch-depth: 0
2020
- name: Set up Go
21-
uses: actions/setup-go@v2
21+
uses: actions/setup-go@v5
2222
with:
23-
go-version: 1.23.6
23+
go-version-file: go.mod
2424
- name: Set up Cosign
2525
uses: sigstore/cosign-installer@v3
2626
- name: Install Carvel Tools

.github/workflows/test-gh.yml

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,44 @@ name: test-gh
1414

1515
jobs:
1616
test-all:
17-
name: Test GH
17+
name: Run all tests
1818
runs-on: ubuntu-latest
19+
strategy:
20+
fail-fast: false
21+
max-parallel: 2
22+
matrix:
23+
k8s-version: [v1.27.0, latest]
1924
steps:
20-
- name: Set up Go 1.x
21-
uses: actions/setup-go@v3
22-
with:
23-
go-version: 1.23.6
2425
- name: Check out code into the Go module directory
25-
uses: actions/checkout@v2
26+
uses: actions/checkout@v4
27+
with:
28+
fetch-depth: 0
29+
- name: Set up Go
30+
uses: actions/setup-go@v5
2631
with:
27-
fetch-depth: 0
32+
go-version-file: go.mod
33+
- name: Resolve Kubernetes version
34+
id: resolve-k8s-version
35+
run: |
36+
k8s_version=${{ matrix.k8s-version }}
37+
if [ "${k8s_version}" = "latest" ]; then
38+
k8s_version=$(curl -Ls -o /dev/null -w %{url_effective} https://github.com/kubernetes/kubernetes/releases/latest | grep -oE 'tag/v[0-9]+\.[0-9]+\.[0-9]+' | cut -d'/' -f2)
39+
echo "Resolved latest k8s version to: $k8s_version"
40+
fi
41+
echo "k8s_version=$k8s_version" >> $GITHUB_ENV
42+
- name: start minikube(k8s version ${{ env.k8s_version }})
43+
uses: medyagh/setup-minikube@latest
44+
with:
45+
kubernetes-version: ${{ env.k8s_version }}
46+
driver: docker
47+
start: true
48+
cpus: 3
49+
memory: 8192m
50+
- name: Verify env
51+
run: |
52+
kind version
53+
kubectl version
54+
go version
2855
- name: Install Carvel Tools
2956
uses: carvel-dev/setup-action@v2
3057
with:
@@ -42,9 +69,8 @@ jobs:
4269
4370
./hack/verify-no-dirty-files.sh
4471
45-
minikube start --driver=docker
4672
eval $(minikube docker-env --shell=bash)
4773
4874
export SECRETGEN_E2E_NAMESPACE=secretgen-test
4975
50-
./hack/test-all.sh
76+
./hack/test-all.sh

.github/workflows/trivy-scan.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ jobs:
6363
security-events: write
6464
steps:
6565
- name: Checkout
66-
uses: actions/checkout@v2
66+
uses: actions/checkout@v4
6767
with:
6868
fetch-depth: 0
6969
- name: Set up Go 1.x
70-
uses: actions/setup-go@v3
70+
uses: actions/setup-go@v5
7171
with:
72-
go-version: 1.23.6
72+
go-version-file: go.mod
7373
- name: Build the secretgen-controller artifacts
7474
run: |
7575
curl -L https://carvel.dev/install.sh | bash

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=$BUILDPLATFORM golang:1.23.6 AS deps
1+
FROM --platform=$BUILDPLATFORM golang:1.23.8 AS deps
22

33
ARG TARGETOS TARGETARCH SGCTRL_VER=development
44
WORKDIR /workspace

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module carvel.dev/secretgen-controller
22

3-
go 1.23.6
3+
go 1.23.8
44

55
require (
66
github.com/cloudfoundry/bosh-utils v0.0.538 // indirect

0 commit comments

Comments
 (0)