Skip to content

Commit 36b651e

Browse files
authored
Merge pull request #6 from cobaltcore-dev/enable-image-publish
build image via go-m-m
2 parents 72e3dc9 + 38ebcaa commit 36b651e

14 files changed

Lines changed: 129 additions & 24 deletions

.claude/settings.local.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(gh pr:*)",
5+
"WebFetch(domain:github.com)",
6+
"WebFetch(domain:raw.githubusercontent.com)",
7+
"Bash(curl:*)"
8+
]
9+
}
10+
}

.github/renovate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
],
1212
"commitMessageAction": "Renovate: Update",
1313
"constraints": {
14-
"go": "1.25"
14+
"go": "1.26"
1515
},
1616
"dependencyDashboardOSVVulnerabilitySummary": "all",
1717
"osvVulnerabilityAlerts": true,

.github/workflows/checks.yaml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ name: Checks
1818
permissions:
1919
checks: write
2020
contents: read
21-
pull-requests: read
2221
jobs:
2322
checks:
2423
name: Checks
@@ -30,7 +29,7 @@ jobs:
3029
uses: actions/setup-go@v6
3130
with:
3231
check-latest: true
33-
go-version: 1.25.5
32+
go-version: 1.26.1
3433
- name: Run golangci-lint
3534
uses: golangci/golangci-lint-action@v9
3635
with:
@@ -42,13 +41,11 @@ jobs:
4241
- name: Dependency Licenses Review
4342
run: make check-dependency-licenses
4443
- name: Check for spelling errors
45-
uses: reviewdog/action-misspell@v1
46-
with:
47-
exclude: ./vendor/*
48-
fail_on_error: true
49-
github_token: ${{ secrets.GITHUB_TOKEN }}
50-
ignore: importas
51-
reporter: github-check
44+
uses: crate-ci/typos@v1
45+
env:
46+
CLICOLOR: "1"
47+
- name: Delete typos binary
48+
run: rm typos
5249
- name: Check if source code files have license header
5350
run: make check-addlicense
5451
- name: REUSE Compliance Check

.github/workflows/ci.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
uses: actions/setup-go@v6
3333
with:
3434
check-latest: true
35-
go-version: 1.25.5
35+
go-version: 1.26.1
3636
- name: Build all binaries
3737
run: make build-all
3838
code_coverage:
@@ -45,7 +45,7 @@ jobs:
4545
- name: Check out code
4646
uses: actions/checkout@v6
4747
- name: Post coverage report
48-
uses: fgrosse/go-coverage-report@v1.2.0
48+
uses: fgrosse/go-coverage-report@v1.3.0
4949
with:
5050
coverage-artifact-name: code-coverage
5151
coverage-file-name: cover.out
@@ -65,11 +65,11 @@ jobs:
6565
uses: actions/setup-go@v6
6666
with:
6767
check-latest: true
68-
go-version: 1.25.5
68+
go-version: 1.26.1
6969
- name: Run tests and generate coverage report
7070
run: make build/cover.out
7171
- name: Archive code coverage results
72-
uses: actions/upload-artifact@v5
72+
uses: actions/upload-artifact@v7
7373
with:
7474
name: code-coverage
7575
path: build/cover.out

.github/workflows/codeql.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
uses: actions/setup-go@v6
3333
with:
3434
check-latest: true
35-
go-version: 1.25.5
35+
go-version: 1.26.1
3636
- name: Initialize CodeQL
3737
uses: github/codeql-action/init@v4
3838
with:
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
################################################################################
2+
# This file is AUTOGENERATED with <https://github.com/sapcc/go-makefile-maker> #
3+
# Edit Makefile.maker.yaml instead. #
4+
################################################################################
5+
6+
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company
7+
# SPDX-License-Identifier: Apache-2.0
8+
9+
name: Container Registry GHCR
10+
"on":
11+
push:
12+
branches:
13+
- master
14+
workflow_dispatch: {}
15+
permissions:
16+
contents: read
17+
packages: write
18+
jobs:
19+
build-and-push-image:
20+
name: Push container to ghcr.io
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Check out code
24+
uses: actions/checkout@v6
25+
- name: Log in to the Container registry
26+
uses: docker/login-action@v4
27+
with:
28+
password: ${{ secrets.GITHUB_TOKEN }}
29+
registry: ghcr.io
30+
username: ${{ github.actor }}
31+
- name: Extract metadata (tags, labels) for Docker
32+
id: meta
33+
uses: docker/metadata-action@v6
34+
with:
35+
images: ghcr.io/${{ github.repository }}
36+
tags: |
37+
# https://github.com/docker/metadata-action#typeedge
38+
type=edge
39+
# https://github.com/docker/metadata-action#latest-tag
40+
type=raw,value=latest,enable={{is_default_branch}}
41+
# https://github.com/docker/metadata-action#typesemver
42+
type=semver,pattern={{raw}}
43+
type=semver,pattern=v{{major}}.{{minor}}
44+
type=semver,pattern=v{{major}}
45+
# https://github.com/docker/metadata-action#typesha
46+
type=sha,format=long
47+
- name: Set up QEMU
48+
uses: docker/setup-qemu-action@v4
49+
- name: Set up Docker Buildx
50+
uses: docker/setup-buildx-action@v4
51+
- name: Build and push Docker image
52+
uses: docker/build-push-action@v7
53+
with:
54+
context: .
55+
labels: ${{ steps.meta.outputs.labels }}
56+
platforms: linux/amd64
57+
push: true
58+
tags: ${{ steps.meta.outputs.tags }}

.golangci.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ linters:
5656
- ineffassign
5757
- intrange
5858
- iotamixing
59-
- misspell
6059
- modernize
6160
- nilerr
6261
- nolintlint
@@ -137,8 +136,20 @@ linters:
137136
excludes:
138137
# gosec wants us to set a short ReadHeaderTimeout to avoid Slowloris attacks, but doing so would expose us to Keep-Alive race conditions (see https://iximiuz.com/en/posts/reverse-proxy-http-keep-alive-and-502s/
139138
- G112
139+
# if we put a password or token into a serialized payload, guess what, we probably did that on purpose
140+
- G117
141+
# this triggers on net/http.Request.ParseForm() and its callers, e.g. net/http.Request.FormValue(), complaining about potential memory exhaustion from unbounded form parsing;
142+
# but that is incorrect, ParseForm() by default never parses more than 10 MiB for this specific reason
143+
- G120
140144
# created file permissions are restricted by umask if necessary
141145
- G306
146+
# the following lints cause false-positives in many repositories, should be fixed with the next release. (see https://github.com/securego/gosec/issues/1500)
147+
- G701
148+
- G702
149+
- G703
150+
- G704
151+
- G705
152+
- G706
142153
govet:
143154
disable:
144155
- fieldalignment
@@ -147,7 +158,7 @@ linters:
147158
require-specific: true
148159
modernize:
149160
disable:
150-
# omitzero requires removing omitempty tags in kubernetes api struct types which are nested, which is intepreted by controller-gen and breaks the CRDs.
161+
# omitzero requires removing omitempty tags in kubernetes api struct types which are nested, which is interpreted by controller-gen and breaks the CRDs.
151162
- omitzero
152163
perfsprint:
153164
# modernize generates nicer fix code

.license-scan-overrides.jsonl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
{"name": "github.com/mattn/go-localereader", "licenceType": "MIT"}
77
{"name": "github.com/miekg/dns", "licenceType": "BSD-3-Clause"}
88
{"name": "github.com/pashagolub/pgxmock/v4", "licenceType": "BSD-3-Clause"}
9+
{"name": "github.com/pashagolub/pgxmock/v5", "licenceType": "BSD-3-Clause"}
910
{"name": "github.com/spdx/tools-golang", "licenceTextOverrideFile": "vendor/github.com/spdx/tools-golang/LICENSE.code"}
1011
{"name": "github.com/xeipuuv/gojsonpointer", "licenceType": "Apache-2.0"}
1112
{"name": "github.com/xeipuuv/gojsonreference", "licenceType": "Apache-2.0"}

.typos.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# SPDX-FileCopyrightText: 2025 SAP SE
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
[default.extend-words]
6+
7+
[files]
8+
extend-exclude = [
9+
"go.mod",
10+
]

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# SPDX-License-Identifier: Apache-2.0
44

55
# Build the manager binary
6-
FROM golang:1.25-alpine AS builder
6+
FROM golang:1.26-alpine AS builder
77

88
WORKDIR /workspace
99
ENV GOTOOLCHAIN=local

0 commit comments

Comments
 (0)