Skip to content

Commit a36ace8

Browse files
committed
use go.mod file in Dgraph repo for go version
1 parent c0dea24 commit a36ace8

File tree

2 files changed

+6
-19
lines changed

2 files changed

+6
-19
lines changed

.github/workflows/cd-dgraph-js.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,10 @@ jobs:
3535
path: dgraph
3636
repository: dgraph-io/dgraph
3737
ref: main
38-
- name: Get Go Version
39-
run: |
40-
#!/bin/bash
41-
cd dgraph
42-
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
43-
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
4438
- name: Set up Go
45-
uses: actions/setup-go@v5
46-
with:
47-
go-version: ${{ env.GOVERSION }}
39+
uses: actions/setup-go@v5
40+
with:
41+
go-version-file: go.mod
4842
- name: Build dgraph binary
4943
run: cd dgraph && make docker-image # also builds dgraph binary
5044
- name: Move dgraph binary to gopath

.github/workflows/ci-dgraph-js.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,10 @@ jobs:
3939
path: dgraph
4040
repository: dgraph-io/dgraph
4141
ref: main
42-
- name: Get Go Version
43-
run: |
44-
#!/bin/bash
45-
cd dgraph
46-
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
47-
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
4842
- name: Set up Go
49-
uses: actions/setup-go@v5
50-
with:
51-
go-version: ${{ env.GOVERSION }}
52-
cache: false
43+
uses: actions/setup-go@v5
44+
with:
45+
go-version-file: go.mod
5346
- name: Build dgraph binary
5447
run: cd dgraph && make docker-image # also builds dgraph binary
5548
- name: Move dgraph binary to gopath

0 commit comments

Comments
 (0)