Skip to content

Commit 2651b49

Browse files
authored
updates on ci, use go1.25 and update deprecated goreleaser steps (#779)
* updates on ci, use go1.25 and update deprecated goreleaser steps Signed-off-by: Carlos Panato <[email protected]> * add nolint Signed-off-by: Carlos Panato <[email protected]> --------- Signed-off-by: Carlos Panato <[email protected]>
1 parent eb5edeb commit 2651b49

File tree

6 files changed

+58
-57
lines changed

6 files changed

+58
-57
lines changed

.github/workflows/ci.yaml

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,33 @@ on:
66
pull_request:
77
branches:
88
- '*'
9+
10+
permissions: {}
11+
912
jobs:
1013
build:
1114
runs-on: ubuntu-latest
15+
16+
permissions:
17+
contents: read
18+
1219
steps:
1320

1421
- name: checkout
1522
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1623
with:
1724
fetch-depth: 0
25+
persist-credentials: false
1826

1927
- name: shellcheck
2028
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # v2.0.0
2129

2230
- name: Setup go
2331
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
2432
with:
25-
go-version-file: './go.mod'
33+
go-version: '1.25'
2634
check-latest: true
35+
cache: false
2736

2837
- uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4 # v4.3.1
2938

@@ -79,12 +88,20 @@ jobs:
7988
check-docs:
8089
name: check-docs
8190
runs-on: ubuntu-latest
91+
92+
permissions:
93+
contents: read
94+
8295
steps:
8396
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
97+
with:
98+
persist-credentials: false
99+
84100
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
85101
with:
86-
go-version-file: './go.mod'
102+
go-version: '1.25'
87103
check-latest: true
104+
cache: false
88105

89106
- name: generate docs
90107
run: |
@@ -100,13 +117,22 @@ jobs:
100117
golangci:
101118
name: lint
102119
runs-on: ubuntu-latest
120+
121+
permissions:
122+
contents: read
123+
103124
steps:
104125
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
126+
with:
127+
persist-credentials: false
128+
105129
- uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
106130
with:
107-
go-version-file: './go.mod'
131+
go-version: '1.25'
108132
check-latest: true
133+
cache: false
134+
109135
- name: golangci-lint
110136
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
111137
with:
112-
version: v2.1
138+
version: v2.5

.github/workflows/release.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
description: Version
77
required: true
88

9+
permissions: {}
10+
911
jobs:
1012
build:
1113
runs-on: ubuntu-latest
@@ -27,8 +29,9 @@ jobs:
2729
- name: Setup go
2830
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
2931
with:
30-
go-version-file: './go.mod'
32+
go-version: '1.25'
3133
check-latest: true
34+
cache: false
3235

3336
- name: Install GoReleaser
3437
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0

.github/workflows/stale.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ on:
33
schedule:
44
- cron: '30 1 * * *'
55

6+
permissions: {}
7+
68
jobs:
79
stale:
810
runs-on: ubuntu-latest

.goreleaser.yml

Lines changed: 19 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ builds:
2424
- linux
2525
- darwin
2626
- windows
27+
ignore:
28+
- goarch: arm
29+
goos: windows
2730
flags:
2831
- -trimpath
2932
mod_timestamp: '{{ .CommitTimestamp }}'
@@ -50,58 +53,25 @@ checksum:
5053
snapshot:
5154
version_template: "{{ .Tag }}-next"
5255

53-
dockers:
54-
- skip_push: false
55-
use: buildx
56-
dockerfile: Dockerfile
57-
image_templates:
58-
- quay.io/helmpack/chart-testing:{{ .Tag }}-amd64
59-
- quay.io/helmpack/chart-testing:latest-amd64
60-
build_flag_templates:
61-
- --platform=linux/amd64
62-
- --label=org.opencontainers.image.version={{ .Version }}
63-
- --label=org.opencontainers.image.revision={{ .Commit }}
64-
- --label=org.opencontainers.image.title={{ .ProjectName }}
65-
- --label=org.opencontainers.image.created={{ .Date }}
66-
- --label=org.opencontainers.image.description=ct - The chart testing tool
67-
- --label=org.opencontainers.image.vendor=Helm
68-
- --label=org.opencontainers.image.licenses=Apache-2.0
69-
- --label=org.opencontainers.image.source=https://github.com/helm/chart-testing
70-
- --label=org.opencontainers.image.authors=The Helm Authors
56+
dockers_v2:
57+
- images:
58+
- "quay.io/helmpack/chart-testing"
59+
tags:
60+
- "{{ .Tag }}"
61+
- "latest"
62+
labels:
63+
"org.opencontainers.image.version": "{{ .Version }}"
64+
"org.opencontainers.image.revision": "{{ .Commit }}"
65+
"org.opencontainers.image.title": "{{ .ProjectName }}"
66+
"org.opencontainers.image.created": "{{ .Date }}"
67+
"org.opencontainers.image.description": "ct - The chart testing tool"
68+
"org.opencontainers.image.vendor": "Helm"
69+
"org.opencontainers.image.licenses": "Apache-2.0"
70+
"org.opencontainers.image.source": "https://github.com/helm/chart-testing"
71+
"org.opencontainers.image.authors": "The Helm Authors"
7172
extra_files:
7273
- etc/chart_schema.yaml
7374
- etc/lintconf.yaml
74-
- skip_push: false
75-
goarch: arm64
76-
use: buildx
77-
dockerfile: Dockerfile
78-
image_templates:
79-
- quay.io/helmpack/chart-testing:{{ .Tag }}-arm64
80-
- quay.io/helmpack/chart-testing:latest-arm64
81-
build_flag_templates:
82-
- --platform=linux/arm64
83-
- --label=org.opencontainers.image.version={{ .Version }}
84-
- --label=org.opencontainers.image.revision={{ .Commit }}
85-
- --label=org.opencontainers.image.title={{ .ProjectName }}
86-
- --label=org.opencontainers.image.created={{ .Date }}
87-
- --label=org.opencontainers.image.description=ct - The chart testing tool
88-
- --label=org.opencontainers.image.vendor=Helm
89-
- --label=org.opencontainers.image.licenses=Apache-2.0
90-
- --label=org.opencontainers.image.source=https://github.com/helm/chart-testing
91-
- --label=org.opencontainers.image.authors=The Helm Authors
92-
extra_files:
93-
- etc/chart_schema.yaml
94-
- etc/lintconf.yaml
95-
96-
docker_manifests:
97-
- name_template: quay.io/helmpack/chart-testing:latest
98-
image_templates:
99-
- quay.io/helmpack/chart-testing:latest-amd64
100-
- quay.io/helmpack/chart-testing:latest-arm64
101-
- name_template: quay.io/helmpack/chart-testing:{{ .Tag }}
102-
image_templates:
103-
- quay.io/helmpack/chart-testing:{{ .Tag }}-amd64
104-
- quay.io/helmpack/chart-testing:{{ .Tag }}-arm64
10575

10676
signs:
10777
- id: all
@@ -115,7 +85,6 @@ docker_signs:
11585
- id: images
11686
cmd: cosign
11787
args: ["sign", "${artifact}"]
118-
artifacts: manifests
11988

12089
changelog:
12190
use: github-native

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ fi \
4747

4848
COPY ./etc/chart_schema.yaml /etc/ct/chart_schema.yaml
4949
COPY ./etc/lintconf.yaml /etc/ct/lintconf.yaml
50-
COPY ct /usr/local/bin/ct
50+
ARG TARGETPLATFORM
51+
COPY $TARGETPLATFORM/ct /usr/local/bin/ct
5152
# Ensure that the binary is available on path and is executable
5253
RUN ct --help

pkg/util/util_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package util
15+
package util //nolint: revive
1616

1717
import (
1818
"fmt"

0 commit comments

Comments
 (0)