From 2df94beb3dc048417d469a7eb3897cda70875f7c Mon Sep 17 00:00:00 2001 From: Aman Mangal Date: Mon, 11 Nov 2024 08:27:44 -0800 Subject: [PATCH] declare min Go version to be v1.21 --- .github/workflows/ci-aqua-security-trivy-tests.yml | 9 ++------- .github/workflows/ci-dgo-tests.yml | 8 +------- .github/workflows/ci-golang-lint.yml | 7 +------ .go-version | 1 - go.mod | 4 +++- 5 files changed, 7 insertions(+), 22 deletions(-) delete mode 100644 .go-version diff --git a/.github/workflows/ci-aqua-security-trivy-tests.yml b/.github/workflows/ci-aqua-security-trivy-tests.yml index df857f0..e8b1c9c 100644 --- a/.github/workflows/ci-aqua-security-trivy-tests.yml +++ b/.github/workflows/ci-aqua-security-trivy-tests.yml @@ -25,20 +25,15 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - - name: Get Go Version - run: | - #!/bin/bash - GOVERSION=$({ [ -f .go-version ] && cat .go-version; }) - echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV - name: Set up Go uses: actions/setup-go@v5 with: - go-version: ${{ env.GOVERSION }} + go-version-file: go.mod - name: Run Trivy vulnerability scanner uses: aquasecurity/trivy-action@master with: scan-type: 'fs' - scan-ref: '.' + scan-ref: '.' format: 'sarif' output: 'trivy-results.sarif' - name: Upload Trivy scan results to GitHub Security tab diff --git a/.github/workflows/ci-dgo-tests.yml b/.github/workflows/ci-dgo-tests.yml index 5727d89..e35a6cd 100644 --- a/.github/workflows/ci-dgo-tests.yml +++ b/.github/workflows/ci-dgo-tests.yml @@ -28,16 +28,10 @@ jobs: with: path: dgo repository: dgraph-io/dgo - - name: Get Go Version - run: | - #!/bin/bash - cd dgraph - GOVERSION=$({ [ -f .go-version ] && cat .go-version; }) - echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV - name: Set up Go uses: actions/setup-go@v5 with: - go-version: ${{ env.GOVERSION }} + go-version-file: dgo/go.mod - name: Make Linux Build and Docker Image run: cd dgraph && make docker-image - name: Move dgraph binary to gopath diff --git a/.github/workflows/ci-golang-lint.yml b/.github/workflows/ci-golang-lint.yml index bb71ae7..0629d5c 100644 --- a/.github/workflows/ci-golang-lint.yml +++ b/.github/workflows/ci-golang-lint.yml @@ -20,15 +20,10 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v4 - - name: Get Go Version - run: | - #!/bin/bash - GOVERSION=$({ [ -f .go-version ] && cat .go-version; }) - echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV - name: Setup Go uses: actions/setup-go@v5 with: - go-version: ${{ env.GOVERSION }} + go-version-file: go.mod - name: golang-lint env: # prevent OOM diff --git a/.go-version b/.go-version deleted file mode 100644 index 71f7f51..0000000 --- a/.go-version +++ /dev/null @@ -1 +0,0 @@ -1.22 diff --git a/go.mod b/go.mod index c72e773..b01d82e 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ module github.com/dgraph-io/dgo/v240 -go 1.22.6 +go 1.21 + +toolchain go1.23.2 require ( github.com/gogo/protobuf v1.3.2