Skip to content

Commit f9ee3ee

Browse files
martinszucclaude
andcommitted
Switch CI to Red Hat Go and add godebug fips140=auto
Add godebug fips140=auto directive to go.mod for FIPS auto-detection on RHEL systems. Replace actions/setup-go with the Red Hat Go container image (ubi9/go-toolset:1.26) in all CI workflows, since upstream Go does not recognize fips140=auto and panics at init. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Martin Szuc <mszuc@redhat.com>
1 parent 19c76d7 commit f9ee3ee

5 files changed

Lines changed: 17 additions & 37 deletions

File tree

.github/workflows/build-test.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,12 @@ permissions:
1616
jobs:
1717
build:
1818
runs-on: ubuntu-latest
19+
container:
20+
image: registry.access.redhat.com/ubi9/go-toolset:1.26
21+
options: --user root
1922
steps:
2023
- name: Checkout source code
2124
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pin@v6.0.2
22-
- name: Add variables to environment file
23-
run: cat ".github/env" >> "$GITHUB_ENV"
24-
- name: Setup Go
25-
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # pin@6.4.0
26-
with:
27-
go-version: '${{ env.GOLANG_VERSION }}'
28-
check-latest: true
2925
- name: Test source headers are present
3026
run: make test-source-headers
3127
- name: Check if go modules need to be tidied

.github/workflows/golangci-lint.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,14 @@ jobs:
1111
golangci:
1212
name: golangci-lint
1313
runs-on: ubuntu-latest
14+
container:
15+
image: registry.access.redhat.com/ubi9/go-toolset:1.26
16+
options: --user root
1417
steps:
1518
- name: Checkout
1619
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pin@v6.0.2
1720
- name: Add variables to environment file
1821
run: cat ".github/env" >> "$GITHUB_ENV"
19-
- name: Setup Go
20-
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # pin@6.4.0
21-
with:
22-
go-version: '${{ env.GOLANG_VERSION }}'
23-
check-latest: true
2422
- name: golangci-lint
2523
uses: golangci/golangci-lint-action@82606bf257cbaff209d206a39f5134f0cfbfd2ee #pin@9.2.1
2624
with:

.github/workflows/govulncheck.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,14 @@ jobs:
1717
govulncheck:
1818
name: govulncheck
1919
runs-on: ubuntu-latest
20+
container:
21+
image: registry.access.redhat.com/ubi9/go-toolset:1.26
22+
options: --user root
2023
steps:
2124
- name: Checkout
2225
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pin@v6.0.2
2326
with:
2427
persist-credentials: false
25-
- name: Add variables to environment file
26-
run: cat ".github/env" >> "$GITHUB_ENV"
27-
- name: Setup Go
28-
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # pin@6.4.0
29-
with:
30-
go-version: '${{ env.GOLANG_VERSION }}'
31-
check-latest: true
3228
- name: govulncheck
3329
uses: golang/govulncheck-action@b625fbe08f3bccbe446d94fbf87fcc875a4f50ee # pin@1.0.4
3430
with:

.github/workflows/release.yml

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,14 @@ jobs:
1818
release:
1919
if: startsWith(github.ref, 'refs/tags/v') && github.repository == 'helm/helm'
2020
runs-on: ubuntu-latest-16-cores
21+
container:
22+
image: registry.access.redhat.com/ubi9/go-toolset:1.26
23+
options: --user root
2124
steps:
2225
- name: Checkout source code
2326
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pin@v6.0.2
2427
with:
2528
fetch-depth: 0
26-
27-
- name: Add variables to environment file
28-
run: cat ".github/env" >> "$GITHUB_ENV"
29-
30-
- name: Setup Go
31-
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # pin@6.4.0
32-
with:
33-
go-version: '${{ env.GOLANG_VERSION }}'
34-
check-latest: true
3529
- name: Run unit tests
3630
run: make test-coverage
3731
- name: Build Helm Binaries
@@ -83,21 +77,15 @@ jobs:
8377
canary-release:
8478
runs-on: ubuntu-latest-16-cores
8579
if: github.ref == 'refs/heads/main' && github.repository == 'helm/helm'
80+
container:
81+
image: registry.access.redhat.com/ubi9/go-toolset:1.26
82+
options: --user root
8683
steps:
8784
- name: Checkout source code
8885
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # pin@v6.0.2
8986
with:
9087
fetch-depth: 0
9188

92-
- name: Add variables to environment file
93-
run: cat ".github/env" >> "$GITHUB_ENV"
94-
95-
- name: Setup Go
96-
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # pin@6.4.0
97-
with:
98-
go-version: '${{ env.GOLANG_VERSION }}'
99-
check-latest: true
100-
10189
- name: Run unit tests
10290
run: make test-coverage
10391

go.mod

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ module helm.sh/helm/v4
22

33
go 1.26.0
44

5+
godebug fips140=auto
6+
57
require (
68
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24
79
github.com/BurntSushi/toml v1.6.0

0 commit comments

Comments
 (0)