diff --git a/.github/workflows/lint-golang.yaml b/.github/workflows/lint-golang.yaml index 8efdf596..5a523545 100644 --- a/.github/workflows/lint-golang.yaml +++ b/.github/workflows/lint-golang.yaml @@ -95,6 +95,7 @@ jobs: - name: check crd sdk if: ${{ needs.filter_changes.outputs.crd == 'true' }} run: | + go version make validate_crd_sdk lint-golang: diff --git a/.github/workflows/update-golang.yaml b/.github/workflows/update-golang.yaml index 37033c20..89d41a26 100644 --- a/.github/workflows/update-golang.yaml +++ b/.github/workflows/update-golang.yaml @@ -27,10 +27,12 @@ jobs: exit 0 } echo "${latest_version}" > GO_VERSION - make update_go_version + cat GO_VERSION + make update_go_version -e GO_VERSION=${latest_version} if ! test -z "$$(git status --porcelain)"; then echo "update golang" echo "RUN_UPDATE=true" >> $GITHUB_ENV + echo "GO_VERSION=${latest_version}" >> $GITHUB_ENV else echo "no need to update golang version" echo "RUN_UPDATE=false" >> $GITHUB_ENV @@ -42,7 +44,7 @@ jobs: if: ${{ env.RUN_UPDATE == 'true' }} uses: peter-evans/create-pull-request@v5.0.2 with: - title: "robot Update project owing to updated Golang Version " + title: "robot updates Golang Version to ${{ env.GO_VERSION }}" commit-message: "robot Update project owing to updated Golang Version " branch-suffix: timestamp branch: robot/update_golang diff --git a/Makefile b/Makefile index 238ae1e3..d5787f55 100644 --- a/Makefile +++ b/Makefile @@ -80,7 +80,7 @@ lint_chart_version: #================= update golang -GO_VERSION := $(shell cat GO_VERSION | tr -d '\n' ) +GO_VERSION ?= $(shell cat GO_VERSION | tr -d '\n' ) GO_IMAGE_VERSION := $(shell awk -F. '{ z=$$3; if (z == "") z=0; print $$1 "." $$2 "." z}' <<< "${GO_VERSION}" ) GO_MAJOR_AND_MINOR_VERSION := $(shell grep -o -E '^[0-9]+\.[0-9]+' <<< "${GO_VERSION}" )