diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bd8af60..3613084 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,11 +11,11 @@ jobs: steps: - name: Checkout source code uses: actions/checkout@v3 - - name: Check license - run: make license-check - name: Set up Go uses: actions/setup-go@v3 with: go-version-file: .go_version + - name: Check license + run: make license-check - name: Build and Check for changes run: make check diff --git a/Makefile b/Makefile index d39db00..e7ed5c0 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ # Check if this GO tools version used is at least the version of go specified in # the go.mod file. The version in go.mod should be in sync with other repos. GO_VERSION := $(shell go version | awk '{print substr($$3, 3, 10)}') -MOD_VERSION := $(shell awk '/^go/ {print $$2}' go.mod) +MOD_VERSION := $(shell cat .go_version) GM := $(word 1,$(subst ., ,$(GO_VERSION))) MM := $(word 1,$(subst ., ,$(MOD_VERSION)))