From 98e975666a2fb0ea62463a1adca135debad07695 Mon Sep 17 00:00:00 2001 From: marko-bekhta Date: Fri, 8 Nov 2024 12:26:35 +0100 Subject: [PATCH] Use a different command as oc registry info is marked "deprecated" --- .github/workflows/deploy.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9bffffbb..30fb7d9a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -61,7 +61,7 @@ jobs: id: oc-registry run: | echo -n "OC_REGISTRY_URL=" >> "$GITHUB_OUTPUT" - oc registry info >> "$GITHUB_OUTPUT" + oc get imagestream -o json | jq -r '.items[0].status.publicDockerImageRepository' | awk -F"[/]" '{print $1}' >> "$GITHUB_OUTPUT" - name: Log in to OpenShift Container Registry uses: docker/login-action@v3 with: @@ -85,12 +85,12 @@ jobs: -Drevision="${{ steps.app-version.outputs.value }}" \ -Dquarkus.container-image.build=true \ -Dquarkus.container-image.push=true \ - -Dquarkus.container-image.registry="$(oc registry info)" \ + -Dquarkus.container-image.registry="$(oc get imagestream -o json | jq -r '.items[0].status.publicDockerImageRepository' | awk -F"[/]" '{print $1}')" \ -Dquarkus.container-image.group="$(oc project --short)" - name: Push Elasticsearch container image run: | - REMOTE_IMAGE_REF="$(oc registry info)/$(oc project --short)/elasticsearch-custom:${{ steps.app-version.outputs.value }}" + REMOTE_IMAGE_REF="$(oc get imagestream -o json | jq -r '.items[0].status.publicDockerImageRepository' | awk -F"[/]" '{print $1}')/$(oc project --short)/elasticsearch-custom:${{ steps.app-version.outputs.value }}" # docker doesn't allow the `push source target` syntax, so we have to do this in two steps. docker image tag "elasticsearch-custom:latest" "$REMOTE_IMAGE_REF" docker push "$REMOTE_IMAGE_REF"