From 8182c1c90b5a785236962395beee587faf1a931e Mon Sep 17 00:00:00 2001 From: Alessandro Sforzin Date: Mon, 29 Jul 2024 09:46:36 +0200 Subject: [PATCH] Update cometbft-db Go version to 1.22.5 (#169) * bumped go version to 1.22.5 * ci workflows fetch the go version from an env variable * fixed path to file exporting go version env var * fixed path to file exporting go version env var * fixed path to file exporting go version env var * updated changelog * Revert "updated changelog". This reverts commit 42a9927d1af0dfd797239738e76f1d2dd551502b. --- .github/workflows/go-version.env | 2 ++ .github/workflows/govulncheck.yml | 9 +++++++-- .github/workflows/lint.yml | 7 ++++++- go.mod | 2 +- tools/Dockerfile | 2 +- 5 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/go-version.env diff --git a/.github/workflows/go-version.env b/.github/workflows/go-version.env new file mode 100644 index 0000000..05140e6 --- /dev/null +++ b/.github/workflows/go-version.env @@ -0,0 +1,2 @@ +# .github/go-version.env +GO_VERSION=1.22.5 diff --git a/.github/workflows/govulncheck.yml b/.github/workflows/govulncheck.yml index 6784451..9a58553 100644 --- a/.github/workflows/govulncheck.yml +++ b/.github/workflows/govulncheck.yml @@ -16,10 +16,15 @@ jobs: govulncheck: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 + + - name: Load Go version + run: echo "GO_VERSION=$(cat .github/workflows/go-version.env | grep GO_VERSION | cut -d '=' -f2)" >> $GITHUB_ENV + - uses: actions/setup-go@v5 with: - go-version: "1.22" - - uses: actions/checkout@v4 + go-version: ${{ env.GO_VERSION }} + - uses: technote-space/get-diff-action@v6 with: PATTERNS: | diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 6e456cc..0d9822a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,9 +14,14 @@ jobs: container: cometbft/cometbft-db-testing steps: - uses: actions/checkout@v4 + + - name: Load Go version + run: echo "GO_VERSION=$(cat .github/workflows/go-version.env | grep GO_VERSION | cut -d '=' -f2)" >> $GITHUB_ENV + - uses: actions/setup-go@v5 with: - go-version: "1.22.2" + go-version: ${{ env.GO_VERSION }} + - uses: golangci/golangci-lint-action@v6.0.1 with: args: --timeout 10m diff --git a/go.mod b/go.mod index f8c745c..9fcfd0a 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/cometbft/cometbft-db -go 1.22.2 +go 1.22.5 require ( github.com/cockroachdb/pebble v1.1.1 diff --git a/tools/Dockerfile b/tools/Dockerfile index 81f6473..af5be3a 100644 --- a/tools/Dockerfile +++ b/tools/Dockerfile @@ -7,7 +7,7 @@ # updates here, merge the changes here first and let the image get updated (or # push a new version manually) before PRs that depend on them. -FROM golang:1.22 AS build +FROM golang:1.22.5 AS build ENV LD_LIBRARY_PATH=/usr/local/lib