Skip to content

Commit

Permalink
github action
Browse files Browse the repository at this point in the history
Signed-off-by: weizhoublue <[email protected]>
  • Loading branch information
weizhoublue committed Dec 25, 2024
1 parent 96aaf4a commit ea66fcb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/lint-golang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/update-golang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -42,7 +44,7 @@ jobs:
if: ${{ env.RUN_UPDATE == 'true' }}
uses: peter-evans/[email protected]
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
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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}" )

Expand Down

0 comments on commit ea66fcb

Please sign in to comment.