diff --git a/.github/workflows/builder_image_golang.yaml b/.github/workflows/builder_image_golang.yaml index 6471e5c6ac..fd08f8240d 100644 --- a/.github/workflows/builder_image_golang.yaml +++ b/.github/workflows/builder_image_golang.yaml @@ -12,7 +12,7 @@ permissions: env: GITHUB_REGISTRY: ghcr.io BUILDER_IMAGE_NAME: dyrector-io/dyrectorio/builder-images/golang - VERSION: 2 + VERSION: 3 jobs: build: runs-on: ubuntu-22.04 @@ -37,7 +37,7 @@ jobs: push: runs-on: ubuntu-22.04 needs: build - if: github.ref_name == 'develop' + #if: github.ref_name == 'develop' environment: Workflow - Protected steps: - name: Artifact download diff --git a/.github/workflows/product_builder.yaml b/.github/workflows/product_builder.yaml index 984193757b..2af025030b 100644 --- a/.github/workflows/product_builder.yaml +++ b/.github/workflows/product_builder.yaml @@ -52,7 +52,7 @@ jobs: runs-on: ubuntu-22.04 container: # yamlfmt resides here because alpine doesn't provide yamlfmt package - image: ghcr.io/dyrector-io/dyrectorio/builder-images/golang:2 + image: ghcr\.io/dyrector-io/dyrectorio/builder-images/golang:3 steps: - name: Checkout uses: actions/checkout@v3 @@ -115,7 +115,7 @@ jobs: runs-on: ubuntu-22.04 needs: gather_changes container: - image: ghcr.io/dyrector-io/dyrectorio/builder-images/golang:2 + image: ghcr\.io/dyrector-io/dyrectorio/builder-images/golang:3 defaults: run: working-directory: ${{ env.GOLANG_WORKING_DIRECTORY }} @@ -139,7 +139,7 @@ jobs: runs-on: ubuntu-22.04 needs: gather_changes container: - image: ghcr.io/dyrector-io/dyrectorio/builder-images/golang:2 + image: ghcr\.io/dyrector-io/dyrectorio/builder-images/golang:3 defaults: run: working-directory: ${{ env.GOLANG_WORKING_DIRECTORY }} @@ -163,7 +163,7 @@ jobs: runs-on: ubuntu-22.04 needs: gather_changes container: - image: ghcr.io/dyrector-io/dyrectorio/builder-images/golang:2 + image: ghcr\.io/dyrector-io/dyrectorio/builder-images/golang:3 defaults: run: working-directory: ${{ env.GOLANG_WORKING_DIRECTORY }} @@ -197,7 +197,7 @@ jobs: runs-on: ubuntu-22.04 needs: gather_changes container: - image: ghcr.io/dyrector-io/dyrectorio/builder-images/golang:2 + image: ghcr\.io/dyrector-io/dyrectorio/builder-images/golang:3 defaults: run: working-directory: ${{ env.GOLANG_WORKING_DIRECTORY }} @@ -258,7 +258,7 @@ jobs: - go_integration - gather_changes container: - image: ghcr.io/dyrector-io/dyrectorio/builder-images/golang:2 + image: ghcr\.io/dyrector-io/dyrectorio/builder-images/golang:3 defaults: run: working-directory: ${{ env.GOLANG_WORKING_DIRECTORY }} @@ -661,7 +661,7 @@ jobs: packages: write runs-on: ubuntu-22.04 container: - image: ghcr.io/dyrector-io/dyrectorio/builder-images/golang:2 + image: ghcr\.io/dyrector-io/dyrectorio/builder-images/golang:3 defaults: run: working-directory: ${{ env.GOLANG_WORKING_DIRECTORY }} diff --git a/.golangci.yml b/.golangci.yml index 86b58953e9..5ff5797bc7 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,7 +1,5 @@ run: timeout: 5m - skip-dirs: - - internal/cache linters-settings: depguard: rules: @@ -19,8 +17,9 @@ linters-settings: funlen: lines: 100 statements: 50 - gci: - local-prefixes: github.com/golangci/golangci-lint + # gci: + # sections: + # - "prefix()" goconst: min-len: 2 min-occurrences: 2 @@ -50,22 +49,18 @@ linters-settings: - condition - return govet: - check-shadowing: true + enable-all: true lll: line-length: 140 - maligned: - suggest-new: true misspell: locale: US nolintlint: - allow-leading-space: true # don't require machine-readable nolint directives (i.e. with no leading space) allow-unused: false # report any unused nolint directives require-explanation: false # don't require an explanation for nolint directives require-specific: false # don't require nolint directives to be specific about which linter is being skipped tenv: all: true staticcheck: - go: "1.18" checks: - all linters: @@ -123,3 +118,5 @@ issues: - path: _test\.go linters: - gomnd + exclude-dirs: + - internal/cache diff --git a/golang/Makefile b/golang/Makefile index ac219b41c5..589bc1ad07 100644 --- a/golang/Makefile +++ b/golang/Makefile @@ -16,11 +16,11 @@ LDFLAGS := -ldflags "-X '${PACKAGE}/internal/version.BuildTimestamp=${BUILD_TIME # default tag is latest for building image_version ?= latest -GOAIR=v1.45.0 -GOSEC=v2.17.0 -GOLANGCI=v1.54.2 -GOFUMPT=v0.5.0 -YAMLFMT=v0.9.0 +GOAIR=v1.51.0 +GOSEC=v2.19.0 +GOLANGCI=v1.57.2 +GOFUMPT=v0.6.0 +YAMLFMT=v0.11.0 # support for: linux darwin windows GOOS?=linux diff --git a/images/builder-golang/Dockerfile b/images/builder-golang/Dockerfile index 060897cbfd..c626ad838a 100644 --- a/images/builder-golang/Dockerfile +++ b/images/builder-golang/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/library/golang:1.20-alpine3.18 +FROM docker.io/library/golang:1.22-alpine3.19 ENV GOLANGCI_LINT_CACHE $GOPATH/cache ENV GOCACHE $GOPATH/cache