diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6f40eea..ee015fb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - uses: docker/login-action@v3 + uses: docker/login-action@v3 with: username: kubevip password: ${{ secrets.DOCKERHUB_KUBEVIP_TOKEN }} @@ -37,5 +37,7 @@ jobs: kubevip/kube-vip-cloud-provider:latest, ghcr.io/kube-vip/kube-vip-cloud-provider:${{ github.ref_name }}, ghcr.io/kube-vip/kube-vip-cloud-provider:latest + build-args: | + VERSION=${{ github.ref_name }} - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/Dockerfile b/Dockerfile index bb0905a..2fbacc7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ RUN --mount=type=cache,target=/root/.local/share/golang \ ARG VERSION -ENV LD_FLAGS="-s -w -extldflags -static -X k8s.io/component-base/version.gitVersion=$VERSION -s" +ENV LD_FLAGS="-s -w -extldflags -static -X k8s.io/component-base/version.gitVersion=$VERSION" RUN --mount=type=cache,target=/root/.cache/go-build \ --mount=type=cache,target=/go/pkg/mod \ --mount=type=cache,target=/root/.local/share/golang \