Skip to content

Commit

Permalink
Merge pull request #3913 from dexidp/update-go
Browse files Browse the repository at this point in the history
build: update Go version
  • Loading branch information
sagikazarmark authored Jan 21, 2025
2 parents 3e90ce9 + c9da08e commit 3ddb5a7
Show file tree
Hide file tree
Showing 14 changed files with 350 additions and 81 deletions.
7 changes: 3 additions & 4 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
if ! has nix_direnv_version || ! nix_direnv_version 3.0.5; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.5/direnvrc" "sha256-RuwIS+QKFj/T9M2TFXScjBsLR6V3A17YVoEW/Q6AZ1w="
if ! has nix_direnv_version || ! nix_direnv_version 3.0.6; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.6/direnvrc" "sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM="
fi

use flake
use flake . --impure

dotenv_if_exists
15 changes: 7 additions & 8 deletions .github/workflows/artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ jobs:
id-token: write
security-events: write


outputs:
name: ${{ steps.image-name.outputs.value }}
digest: ${{ steps.build.outputs.digest }}
Expand Down Expand Up @@ -203,21 +202,21 @@ jobs:
with:
path: cache/db
key: trivy-cache-${{ steps.date.outputs.date }}
restore-keys:
trivy-cache-
restore-keys: trivy-cache-

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # 0.29.0
with:
input: image
format: sarif
output: trivy-results.sarif
scan-type: 'fs'
scan-ref: '.'
scan-type: "fs"
scan-ref: "."
cache-dir: "./cache"
env:
TRIVY_SKIP_DB_UPDATE: true
TRIVY_SKIP_JAVA_DB_UPDATE: true
# Disable skipping trivy cache for now
# env:
# TRIVY_SKIP_DB_UPDATE: true
# TRIVY_SKIP_JAVA_DB_UPDATE: true

## Trivy-db uses `0600` permissions.
## But `action/cache` use `runner` user by default
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI

on:
push:
branches: [ master ]
branches: [master]
pull_request:

permissions:
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: "1.21"
go-version: "1.23"

- name: Download tool dependencies
run: make deps
Expand Down Expand Up @@ -142,7 +142,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version: "1.21"
go-version: "1.23"

- name: Download golangci-lint
run: make bin/golangci-lint
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.devenv/
/.direnv/
/.idea/
/bin/
Expand Down
23 changes: 13 additions & 10 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
run:
timeout: 4m
skip-dirs:
- storage/ent/db # generated ent code

linters-settings:
depguard:
rules:
deprecated:
deny:
- pkg: "io/ioutil"
desc: "The 'io/ioutil' package is deprecated. Use corresponding 'os' or 'io' functions instead."
rules:
deprecated:
deny:
- pkg: "io/ioutil"
desc: "The 'io/ioutil' package is deprecated. Use corresponding 'os' or 'io' functions instead."
gci:
local-prefixes: github.com/dexidp/dex
sections:
- standard
- default
- prefix(github.com/dexidp/dex)
goimports:
local-prefixes: github.com/dexidp/dex


linters:
disable-all: true
enable:
- depguard
- dogsled
- exhaustive
- exportloopref
- gci
- gochecknoinits
- gocritic
Expand Down Expand Up @@ -92,3 +91,7 @@ linters:
# - nestif
# - testpackage
# - wsl

issues:
exclude-dirs:
- storage/ent/db # generated ent code
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ export GOBIN=$(PWD)/bin
LD_FLAGS="-w -X main.version=$(VERSION)"

# Dependency versions
GOLANGCI_VERSION = 1.56.2
GOTESTSUM_VERSION ?= 1.10.1
GOLANGCI_VERSION = 1.63.4
GOTESTSUM_VERSION ?= 1.12.0

PROTOC_VERSION = 24.4
PROTOC_GEN_GO_VERSION = 1.32.0
Expand Down
2 changes: 1 addition & 1 deletion api/v2/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/dexidp/dex/api/v2

go 1.21
go 1.23

require (
google.golang.org/grpc v1.65.0
Expand Down
2 changes: 1 addition & 1 deletion connector/saml/saml.go
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ func (p *provider) validateStatus(status *status) error {
if statusMessage != nil && statusMessage.Value != "" {
errorMessage += " -> " + statusMessage.Value
}
return fmt.Errorf(errorMessage)
return errors.New(errorMessage)
}
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion examples/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/dexidp/dex/examples

go 1.21
go 1.23

require (
github.com/coreos/go-oidc/v3 v3.11.0
Expand Down
Loading

0 comments on commit 3ddb5a7

Please sign in to comment.