Merge pull request #30 from 1Password/fix-cli-version

Fix the version passed to the image
This commit is contained in:
Joris Coenen
2021-04-30 16:39:29 +02:00
committed by GitHub
2 changed files with 5 additions and 2 deletions

View File

@@ -28,6 +28,9 @@ jobs:
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Get the version from tag
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
@@ -51,4 +54,4 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
operator_version=${{ github.event.ref }}
operator_version=${{ steps.get_version.outputs.VERSION }}

View File

@@ -16,7 +16,7 @@ ARG operator_version=dev
RUN CGO_ENABLED=0 \
GO111MODULE=on \
go build \
-ldflags "-X version.Version=$operator_version" \
-ldflags "-X \"github.com/1Password/onepassword-operator/version.Version=$operator_version\"" \
-mod vendor \
-a -o manager main.go