Skip to content

Commit

Permalink
Use a different command as oc registry info is marked "deprecated"
Browse files Browse the repository at this point in the history
  • Loading branch information
marko-bekhta committed Nov 8, 2024
1 parent 03c56fc commit 0cf1365
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"
Expand Down

0 comments on commit 0cf1365

Please sign in to comment.