@@ -213,6 +213,21 @@ jobs:
213213      - name : Setup ko 
214214        uses : ko-build/setup-ko@d006021bd0c28d1ce33a07e7943d48b079944c8d  #  v0.9
215215
216+       - name : Set up Docker Buildx 
217+         uses : docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435  #  v3.11.1
218+ 
219+       - name : Extract UBI metadata 
220+         id : ubi-meta 
221+         uses : docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f  #  v5.8.0
222+         with :
223+           images : ${{ env.BASE_REPO }} 
224+           tags : | 
225+             type=raw,value=${{ steps.version-string.outputs.tag }}-ubi 
226+ labels : | 
227+             name=toolhive-operator 
228+             vendor=Stacklok 
229+             maintainer=Stacklok 
230+ 
216231name : Install Cosign 
217232        uses : sigstore/cosign-installer@7e8b541eb2e61bf99390e1afd4be13a184e9ebc5  #  v3.10.1
218233
@@ -234,13 +249,29 @@ jobs:
234249          KO_DOCKER_REPO=$BASE_REPO ko build --platform=linux/amd64,linux/arm64 --bare $TAGS ./cmd/thv-operator \ 
235250            --image-label=org.opencontainers.image.source=https://github.com/stacklok/toolhive,org.opencontainers.image.title="toolhive-operator",org.opencontainers.image.vendor=Stacklok 
236251
252+ name : Build and Push UBI Image to GHCR 
253+         uses : docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83  #  v6.18.0
254+         with :
255+           file : containers/operator/Dockerfile 
256+           platforms : linux/amd64,linux/arm64 
257+           push : true 
258+           tags : ${{ steps.ubi-meta.outputs.tags }} 
259+           build-args : | 
260+             CODEDIR=cmd/thv-operator 
261+             VERSION=${{ steps.version-string.outputs.tag }}-ubi 
262+             COMMIT=${{ github.sha }} 
263+             BUILD_DATE=${{ github.event.head_commit.timestamp }} 
264+ labels : ${{ steps.ubi-meta.outputs.labels }} 
265+ 
237266      - name : Sign Image with Cosign 
238267        #  This step uses the identity token to provision an ephemeral certificate
239268        #  against the sigstore community Fulcio instance.
240269        run : | 
241270          TAG=$(echo "${{ steps.version-string.outputs.tag }}" | sed 's/+/_/g') 
271+           UBI_TAG=$(echo "${{ steps.version-string.outputs.tag }}-ubi" | sed 's/+/_/g') 
242272          # Sign the ko image 
243273          cosign sign -y $BASE_REPO:$TAG 
274+           cosign sign -y $BASE_REPO:$UBI_TAG 
244275           
245276          # Sign the latest tag if building from a tag 
246277          if [[ "${{ github.ref }}" == refs/tags/* ]]; then 
@@ -293,6 +324,21 @@ jobs:
293324      - name : Setup ko 
294325        uses : ko-build/setup-ko@d006021bd0c28d1ce33a07e7943d48b079944c8d  #  v0.9
295326
327+       - name : Set up Docker Buildx 
328+         uses : docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435  #  v3.11.1
329+ 
330+       - name : Extract UBI metadata 
331+         id : ubi-meta 
332+         uses : docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f  #  v5.8.0
333+         with :
334+           images : ${{ env.BASE_REPO }} 
335+           tags : | 
336+             type=raw,value=${{ steps.version-string.outputs.tag }}-ubi 
337+ labels : | 
338+             name=toolhive-proxyrunner 
339+             vendor=Stacklok 
340+             maintainer=Stacklok 
341+ 
296342name : Install Cosign 
297343        uses : sigstore/cosign-installer@7e8b541eb2e61bf99390e1afd4be13a184e9ebc5  #  v3.10.1
298344
@@ -314,13 +360,29 @@ jobs:
314360          KO_DOCKER_REPO=$BASE_REPO ko build --platform=linux/amd64,linux/arm64 --bare $TAGS ./cmd/thv-proxyrunner \ 
315361            --image-label=org.opencontainers.image.source=https://github.com/stacklok/toolhive,org.opencontainers.image.title="toolhive-proxyrunner",org.opencontainers.image.vendor=Stacklok 
316362
363+ name : Build and Push UBI Image to GHCR 
364+         uses : docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83  #  v6.18.0
365+         with :
366+           file : containers/operator/Dockerfile 
367+           platforms : linux/amd64,linux/arm64 
368+           push : true 
369+           tags : ${{ steps.ubi-meta.outputs.tags }} 
370+           build-args : | 
371+             CODEDIR=cmd/thv-proxyrunner 
372+             VERSION=${{ steps.version-string.outputs.tag }} 
373+             COMMIT=${{ github.sha }} 
374+             BUILD_DATE=${{ github.event.head_commit.timestamp }} 
375+ labels : ${{ steps.ubi-meta.outputs.labels }} 
376+ 
317377      - name : Sign Image with Cosign 
318378        #  This step uses the identity token to provision an ephemeral certificate
319379        #  against the sigstore community Fulcio instance.
320380        run : | 
321381          TAG=$(echo "${{ steps.version-string.outputs.tag }}" | sed 's/+/_/g') 
382+           UBI_TAG=$(echo "${{ steps.version-string.outputs.tag }}-ubi" | sed 's/+/_/g') 
322383          # Sign the ko image 
323384          cosign sign -y $BASE_REPO:$TAG 
385+           cosign sign -y $BASE_REPO:$UBI_TAG 
324386           
325387          # Sign the latest tag if building from a tag 
326388          if [[ "${{ github.ref }}" == refs/tags/* ]]; then 
0 commit comments