From 19602207811db34bbc4115cb991c50a8374e773d Mon Sep 17 00:00:00 2001 From: Aman Mangal Date: Thu, 28 Nov 2024 18:20:58 +0530 Subject: [PATCH] use go.mod file in Dgraph repo for go version (#243) --- .github/workflows/cd-dgraph-js.yml | 12 +++--------- .github/workflows/ci-dgraph-js.yml | 13 +++---------- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/.github/workflows/cd-dgraph-js.yml b/.github/workflows/cd-dgraph-js.yml index dc4b8b2..a10f564 100644 --- a/.github/workflows/cd-dgraph-js.yml +++ b/.github/workflows/cd-dgraph-js.yml @@ -35,16 +35,10 @@ jobs: path: dgraph repository: dgraph-io/dgraph ref: main - - 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 }} + uses: actions/setup-go@v5 + with: + go-version-file: go.mod - name: Build dgraph binary run: cd dgraph && make docker-image # also builds dgraph binary - name: Move dgraph binary to gopath diff --git a/.github/workflows/ci-dgraph-js.yml b/.github/workflows/ci-dgraph-js.yml index 75ebaa0..14d0105 100644 --- a/.github/workflows/ci-dgraph-js.yml +++ b/.github/workflows/ci-dgraph-js.yml @@ -39,17 +39,10 @@ jobs: path: dgraph repository: dgraph-io/dgraph ref: main - - 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 }} - cache: false + uses: actions/setup-go@v5 + with: + go-version-file: go.mod - name: Build dgraph binary run: cd dgraph && make docker-image # also builds dgraph binary - name: Move dgraph binary to gopath