From 3bd6c08dab24c83b52a46c7a2163064f68958b49 Mon Sep 17 00:00:00 2001 From: Gustavo Hidalgo Date: Mon, 15 Apr 2024 14:17:08 -0400 Subject: [PATCH] Publish tagged builds to pccomponents (#202) --- .github/workflows/cicd.yml | 4 +++- scripts/cipublish | 13 ++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index c2601d48..8da48b54 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -33,14 +33,16 @@ jobs: case "${GITHUB_REF}" in *tags*) echo "tag=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT + echo "ACR=pccomponents" >> $GITHUB_OUTPUT ;; *) echo "tag=latest" >> $GITHUB_OUTPUT + echo "ACR=pccomponentstest" >> $GITHUB_OUTPUT ;; esac - name: Publish images - run: ./scripts/cipublish --acr pccomponentstest --tag ${{steps.get_image_tag.outputs.tag}} + run: ./scripts/cipublish --acr ${{steps.get_image_tag.outputs.ACR}} --tag ${{steps.get_image_tag.outputs.tag}} outputs: image_tag: ${{ steps.get_image_tag.outputs.tag }} diff --git a/scripts/cipublish b/scripts/cipublish index 062c396f..a6a85a99 100755 --- a/scripts/cipublish +++ b/scripts/cipublish @@ -120,17 +120,8 @@ if [ "${BASH_SOURCE[0]}" = "${0}" ]; then install_oras fi - # only _tagged_ releases will be synced from pcccr to MAR - case $IMAGE_TAG in - *latest*) - image_prefix="private" - ;; - *) - image_prefix="public" - ;; - esac # Publish images - publish_image "pc-apis-stac" "$image_prefix/planetary-computer-apis/stac" - publish_image "pc-apis-tiler" "$image_prefix/planetary-computer-apis/tiler" + publish_image "pc-apis-stac" "planetary-computer-apis/stac" + publish_image "pc-apis-tiler" "planetary-computer-apis/tiler" fi