Skip to content

Commit 6ffb9c4

Browse files
authored
Merge branch 'main' into renovate/golang-deps
2 parents 74252b7 + 0582aeb commit 6ffb9c4

File tree

12 files changed

+43
-39
lines changed

12 files changed

+43
-39
lines changed

.github/actions/setup-go/action.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ runs:
44
using: "composite"
55
steps:
66
- name: Install go
7-
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
7+
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
88
with:
99
go-version-file: "go.mod"
1010
cache: true
@@ -15,14 +15,14 @@ runs:
1515
echo "go-build=$(go env GOCACHE)" >> $GITHUB_OUTPUT
1616
echo "go-mod=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
1717
- name: Go Mod Cache
18-
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
18+
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
1919
with:
2020
path: ${{ steps.go-cache-paths.outputs.go-mod }}
2121
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
2222
restore-keys: |
2323
${{ runner.os }}-go-mod-
2424
- name: Go Build Cache
25-
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
25+
uses: actions/cache@0c907a75c2c80ebcb7f088228285e798b750cf8f # v4
2626
with:
2727
path: ${{ steps.go-cache-paths.outputs.go-build }}
2828
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}

.github/workflows/builder-image.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
1818

1919
- name: Set up Docker Buildx
20-
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3
20+
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3
2121

2222
- name: Login to Docker Hub
2323
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3
@@ -27,7 +27,7 @@ jobs:
2727
password: ${{ secrets.GITHUB_TOKEN }}
2828

2929
- name: Build and push
30-
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6
30+
uses: docker/build-push-action@0adf9959216b96bec444f325f1e493d4aa344497 # v6
3131
with:
3232
file: ./images/builder/Dockerfile
3333
context: ./images/builder

.github/workflows/pr-verify.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Verify Shellcheck
2727
run: make verify-shellcheck
2828

29-
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
29+
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4
3030
with:
3131
node-version: "18"
3232
- name: Install renovate

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ jobs:
1717
with:
1818
fetch-depth: 0
1919
- run: git fetch --force --tags
20-
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5
20+
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5
2121
with:
2222
go-version: stable
2323

24-
- uses: goreleaser/goreleaser-action@9ed2f89a662bf1735a48bc8557fd212fa902bebf # v6
24+
- uses: goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3 # v6
2525
with:
2626
distribution: goreleaser
2727
version: latest

.github/workflows/schedule-link-checker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
private_key: ${{ secrets.SCS_APP_PRIVATE_KEY }}
2222

2323
- name: Link Checker
24-
uses: lycheeverse/lychee-action@f81112d0d2814ded911bd23e3beaa9dda9093915 # v2.1.0
24+
uses: lycheeverse/lychee-action@f613c4a64e50d792e0b31ec34bbcbba12263c6a6 # v2.3.0
2525
id: lychee
2626
env:
2727
GITHUB_TOKEN: "${{ steps.generate-token.outputs.token }}"

.github/workflows/schedule-update-bot.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
echo "LOG_LEVEL=${{ github.event.inputs.logLevel || env.LOG_LEVEL }}" >> "$GITHUB_ENV"
4646
4747
- name: Renovate
48-
uses: renovatebot/github-action@02f4fdeb479bbb229caa7ad82cb5e691c07e80b3 # v41.0.14
48+
uses: renovatebot/github-action@822441559e94f98b67b82d97ab89fe3003b0a247 # v44.2.0
4949
env:
5050
RENOVATE_HOST_RULES: '[{"hostType": "docker", "matchHost": "ghcr.io", "username": "${{ github.actor }}", "password": "${{ secrets.GITHUB_TOKEN }}" }]'
5151
RENOVATE_ALLOWED_POST_UPGRADE_COMMANDS: '[".*"]'

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ linters:
77
- bodyclose
88
- containedctx
99
- contextcheck
10+
- copyloopvar
1011
- durationcheck
1112
- errchkjson
1213
- errname
1314
- errorlint
1415
- exhaustive
15-
- exportloopref
1616
- forcetypeassert
1717
- gci
1818
- gocritic

images/builder/Dockerfile

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ FROM docker.io/library/alpine:3.21.3@sha256:a8560b36e8b8210634f77d9f7f9efd7ffa46
2222
ENV LYCHEE_VERSION="v0.15.1"
2323
# hadolint ignore=DL3018
2424
RUN apk add --no-cache curl && \
25-
curl -L -o /tmp/lychee-${LYCHEE_VERSION}.tgz https://github.com/lycheeverse/lychee/releases/download/${LYCHEE_VERSION}/lychee-${LYCHEE_VERSION}-x86_64-unknown-linux-gnu.tar.gz && \
26-
tar -xz -C /tmp -f /tmp/lychee-${LYCHEE_VERSION}.tgz && \
27-
mv /tmp/lychee /usr/bin/lychee && \
28-
rm -rf /tmp/linux-amd64 /tmp/lychee-${LYCHEE_VERSION}.tgz
25+
curl -L -o /tmp/lychee-${LYCHEE_VERSION}.tgz https://github.com/lycheeverse/lychee/releases/download/${LYCHEE_VERSION}/lychee-${LYCHEE_VERSION}-x86_64-unknown-linux-gnu.tar.gz && \
26+
tar -xz -C /tmp -f /tmp/lychee-${LYCHEE_VERSION}.tgz && \
27+
mv /tmp/lychee /usr/bin/lychee && \
28+
rm -rf /tmp/linux-amd64 /tmp/lychee-${LYCHEE_VERSION}.tgz
2929

3030
# Install Golang CI Lint
3131
FROM docker.io/library/alpine:3.21.3@sha256:a8560b36e8b8210634f77d9f7f9efd7ffa463e380b75e2e74aff4511df3ef88c as golangci
@@ -34,7 +34,7 @@ ENV GOLANGCI_VERSION="v1.64.5"
3434
WORKDIR /
3535
# hadolint ignore=DL3018,DL4006
3636
RUN apk add --no-cache curl && \
37-
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s ${GOLANGCI_VERSION}
37+
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s ${GOLANGCI_VERSION}
3838

3939
# Install Hadolint
4040
FROM docker.io/hadolint/hadolint:v2.12.0-alpine@sha256:3c206a451cec6d486367e758645269fd7d696c5ccb6ff59d8b03b0e45268a199 as hadolint
@@ -45,7 +45,7 @@ FROM docker.io/aquasec/trivy:0.59.1@sha256:029e990b328d149bf0a9ffe355919041e1f86
4545
############################
4646
# csctl Build Image Base #
4747
############################
48-
FROM docker.io/library/golang:1.21.6-bullseye@sha256:c62751ac12cad0c514d941e36f846c1c440ca9e8ec08dd87d022fb03f0887a9b
48+
FROM docker.io/library/golang:1.22-bullseye
4949

5050
# update: datasource=repology depName=debian_11/skopeo versioning=loose
5151
ENV SKOPEO_VERSION="1.2.2+dfsg1-1+b6"
@@ -56,16 +56,16 @@ ENV YAMLFIXER_VERSION="0.9.15"
5656

5757
# hadolint ignore=DL3008
5858
RUN apt-get update && \
59-
apt-get install -qy --no-install-recommends \
60-
gnupg python3 python3-pip \
61-
file zip unzip jq gettext \
62-
skopeo=${SKOPEO_VERSION} \
63-
protobuf-compiler libprotobuf-dev \
64-
libsystemd-dev jq && \
65-
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
66-
pip install --no-cache-dir \
67-
yamllint==${YAMLLINT_VERSION} \
68-
yamlfixer-opt-nc==${YAMLFIXER_VERSION}
59+
apt-get install -qy --no-install-recommends \
60+
gnupg python3 python3-pip \
61+
file zip unzip jq gettext \
62+
skopeo=${SKOPEO_VERSION} \
63+
protobuf-compiler libprotobuf-dev \
64+
libsystemd-dev jq && \
65+
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
66+
pip install --no-cache-dir \
67+
yamllint==${YAMLLINT_VERSION} \
68+
yamlfixer-opt-nc==${YAMLFIXER_VERSION}
6969

7070
COPY --from=lychee /usr/bin/lychee /usr/bin/lychee
7171
COPY --from=golangci /bin/golangci-lint /usr/local/bin

pkg/clusterstack/config.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ limitations under the License.
1818
package clusterstack
1919

2020
import (
21+
"errors"
2122
"fmt"
2223
"os"
2324
"path/filepath"
@@ -58,11 +59,11 @@ func GetCsctlConfig(path string) (*CsctlConfig, error) {
5859
}
5960

6061
if cs.Config.Provider.Type == "" {
61-
return nil, fmt.Errorf("provider type must not be empty")
62+
return nil, errors.New("provider type must not be empty")
6263
}
6364

6465
if len(cs.Config.Provider.Type) > 253 {
65-
return nil, fmt.Errorf("provider name must not be greater than 253")
66+
return nil, errors.New("provider name must not be greater than 253")
6667
}
6768

6869
match, err := regexp.MatchString(`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`, cs.Config.Provider.Type)
@@ -74,7 +75,7 @@ func GetCsctlConfig(path string) (*CsctlConfig, error) {
7475
}
7576

7677
if cs.Config.ClusterStackName == "" {
77-
return nil, fmt.Errorf("cluster stack name must not be empty")
78+
return nil, errors.New("cluster stack name must not be empty")
7879
}
7980

8081
// Validate kubernetes version

pkg/clusterstack/version.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ limitations under the License.
1717
package clusterstack
1818

1919
import (
20+
"errors"
2021
"fmt"
2122
"regexp"
2223
"strconv"
@@ -30,7 +31,7 @@ func BumpVersion(version string) (string, error) {
3031

3132
// Check if a numeric part was found
3233
if len(matches) < 2 {
33-
return "", fmt.Errorf("invalid version format")
34+
return "", errors.New("invalid version format")
3435
}
3536

3637
// Extract and convert the numeric part to an integer

0 commit comments

Comments
 (0)