From 64c44b0323759a7c7d1993f3594d0a56f30fb65c Mon Sep 17 00:00:00 2001 From: zhzhuang-zju Date: Tue, 13 Aug 2024 16:05:53 +0800 Subject: [PATCH] use single source for go version Signed-off-by: zhzhuang-zju --- .github/workflows/ci-image-scanning.yaml | 4 ++++ .github/workflows/dockerhub-latest-chart.yml | 4 ++++ .github/workflows/dockerhub-released-chart.yml | 4 ++++ .github/workflows/lint-chart.yaml | 5 +++++ 4 files changed, 17 insertions(+) diff --git a/.github/workflows/ci-image-scanning.yaml b/.github/workflows/ci-image-scanning.yaml index 741529b957d8..24e51df3214b 100644 --- a/.github/workflows/ci-image-scanning.yaml +++ b/.github/workflows/ci-image-scanning.yaml @@ -32,6 +32,10 @@ jobs: steps: - name: checkout code uses: actions/checkout@v4 + - name: install Go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod - name: Build an image from Dockerfile run: | export VERSION="latest" diff --git a/.github/workflows/dockerhub-latest-chart.yml b/.github/workflows/dockerhub-latest-chart.yml index 6b6a7ca7ae07..7bbd8bfcac89 100644 --- a/.github/workflows/dockerhub-latest-chart.yml +++ b/.github/workflows/dockerhub-latest-chart.yml @@ -22,6 +22,10 @@ jobs: # 0 indicates all history for all branches and tags. # for `git describe --tags` in Makefile. fetch-depth: 0 + - name: install Go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod - name: login to DockerHub uses: docker/login-action@v3 with: diff --git a/.github/workflows/dockerhub-released-chart.yml b/.github/workflows/dockerhub-released-chart.yml index 0b1d1096f29f..bd8fe2c19d7a 100644 --- a/.github/workflows/dockerhub-released-chart.yml +++ b/.github/workflows/dockerhub-released-chart.yml @@ -17,6 +17,10 @@ jobs: # 0 indicates all history for all branches and tags. # for `git describe --tags` in Makefile. fetch-depth: 0 + - name: install Go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod - name: login to DockerHub uses: docker/login-action@v3 with: diff --git a/.github/workflows/lint-chart.yaml b/.github/workflows/lint-chart.yaml index 5e9276a8ba28..3747414fd06e 100644 --- a/.github/workflows/lint-chart.yaml +++ b/.github/workflows/lint-chart.yaml @@ -29,6 +29,11 @@ jobs: with: fetch-depth: 0 + - name: install Go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + - name: Set up Helm uses: azure/setup-helm@v4 with: