Skip to content

Commit

Permalink
Publish tagged builds to pccomponents (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
ghidalgo3 authored Apr 15, 2024
1 parent f983bea commit 3bd6c08
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
13 changes: 2 additions & 11 deletions scripts/cipublish
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3bd6c08

Please sign in to comment.