diff --git a/.github/workflows/march-image-build-push.yml b/.github/workflows/march-image-build-push.yml index e70724b8..6e87946b 100644 --- a/.github/workflows/march-image-build-push.yml +++ b/.github/workflows/march-image-build-push.yml @@ -21,6 +21,9 @@ jobs: image_name: "tackle2-hub" containerfile: "./Dockerfile" architectures: '[ "amd64", "arm64" ]' + extra-args: | + --build-arg + VERSION=${{ github.tag}}-${{ github.ref }} secrets: registry_username: ${{ secrets.QUAY_PUBLISH_ROBOT }} registry_password: ${{ secrets.QUAY_PUBLISH_TOKEN }} diff --git a/Dockerfile b/Dockerfile index f7d573cd..137948d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,13 +15,15 @@ FROM quay.io/konveyor/static-report as report FROM registry.access.redhat.com/ubi9/ubi-minimal ARG SEED_ROOT +ARG VERSION=latest COPY --from=builder /opt/app-root/src/bin/hub /usr/local/bin/tackle-hub -COPY --from=builder /opt/app-root/src/bin/.build /etc/hub-build COPY --from=builder /opt/app-root/src/auth/roles.yaml /tmp/roles.yaml COPY --from=builder /opt/app-root/src/auth/users.yaml /tmp/users.yaml COPY --from=builder ${SEED_ROOT}/resources/ /tmp/seed COPY --from=report /usr/local/static-report /tmp/analysis/report +RUN echo "${VERSION}" > /etc/hub-build + RUN microdnf -y install \ sqlite \ && microdnf -y clean all diff --git a/Makefile b/Makefile index 32a72d97..77de6b71 100644 --- a/Makefile +++ b/Makefile @@ -60,7 +60,6 @@ debug: generate fmt vet docker: vet go build $(BUILD) - git describe --always --match "v[0-9]*" --tags HEAD > bin/.build # Run against the configured Kubernetes cluster in ~/.kube/config run: fmt vet