Skip to content

Commit

Permalink
👻 use build args for the tags (#124)
Browse files Browse the repository at this point in the history
Signed-off-by: David Zager <dzager@redhat.com>
  • Loading branch information
djzager authored Jun 3, 2024
1 parent 4db6dfb commit bf50ffd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/multi-arch_images_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@ jobs:
image_name: "windup-shim"
image_namespace: "konveyor"
image_registry: "quay.io"
pre_build_cmd: |
TAG=${GITHUB_REF_NAME/main/latest}
sed -i "s,FROM quay.io/konveyor/analyzer-lsp.*,FROM quay.io/konveyor/analyzer-lsp:${TAG}," core.Dockerfile
sed -i "s,FROM quay.io/konveyor/java-external-provider.*,FROM quay.io/konveyor/java-external-provider:${TAG}," core.Dockerfile
extra-args: |
--build-arg VERSION=${{ github.ref_name == 'main' && 'latest' || github.ref_name }}
quay_publish_robot: ${{ secrets.QUAY_PUBLISH_ROBOT }}
quay_publish_token: ${{ secrets.QUAY_PUBLISH_TOKEN }}
ref: ${{ github.ref }}
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ARG VERSION=latest

FROM golang:1.21 as builder
WORKDIR /windup-shim

Expand All @@ -8,10 +10,10 @@ COPY main.go /windup-shim

RUN go build -o windup-shim main.go

FROM quay.io/konveyor/analyzer-lsp:latest as analyzer-lsp
FROM quay.io/konveyor/analyzer-lsp:${VERSION} as analyzer-lsp

# This is the container built from the Dockerfile in the analyzer-lsp project
FROM quay.io/konveyor/java-external-provider:latest
FROM quay.io/konveyor/java-external-provider:${VERSION}

# TODO debug only
RUN microdnf install -y procps vim wget unzip git
Expand Down

0 comments on commit bf50ffd

Please sign in to comment.