@@ -78,11 +78,10 @@ jobs:
7878 ECR_REPOSITORY : decode-cloud/user-api
7979 PYTHON_VERSION : ${{ steps.get-python-version.outputs.PYTHON_VERSION }}
8080 run : |
81- ECR_REPOSITORY_FULL=$ECR_REGISTRY/$ECR_REPOSITORY
82- if ! aws ecr-public describe-repositories --repository-names $ECR_REPOSITORY_FULL --region us-east-1 2>/dev/null; then
83- aws ecr-public create-repository --repository-name $ECR_REPOSITORY_FULL --region us-east-1
81+ if ! aws ecr-public describe-repositories --repository-names $ECR_REPOSITORY --region us-east-1 2>/dev/null; then
82+ aws ecr-public create-repository --repository-name $ECR_REPOSITORY --region us-east-1
8483 fi
85- IMAGE_REF=$ECR_REPOSITORY_FULL :$VERSION
84+ IMAGE_REF=$ECR_REGISTRY/$ECR_REPOSITORY :$VERSION
8685 echo "IMAGE_REF=$IMAGE_REF" >> $GITHUB_OUTPUT
8786 if docker manifest inspect $IMAGE_REF > /dev/null 2>&1; then
8887 NEW_IMAGE=false
@@ -94,17 +93,17 @@ jobs:
9493 echo "## 🚀 Published Docker Image: $IMAGE_REF" >> $GITHUB_STEP_SUMMARY
9594 if [[ $PROD == "true" ]]; then
9695 SET_LATEST=true
97- LATEST_EXISTS=$(docker manifest inspect $ECR_REPOSITORY_FULL :latest > /dev/null 2>&1 && echo "true" || echo "false")
96+ LATEST_EXISTS=$(docker manifest inspect $ECR_REGISTRY/$ECR_REPOSITORY :latest > /dev/null 2>&1 && echo "true" || echo "false")
9897 if [[ $LATEST_EXISTS == "true" ]]; then
99- LATEST_LABELS=$(docker manifest inspect $ECR_REPOSITORY_FULL :latest | grep -o '"org.opencontainers.image.version":"[^"]*"' | cut -d'"' -f4 || echo "")
98+ LATEST_LABELS=$(docker manifest inspect $ECR_REGISTRY/$ECR_REPOSITORY :latest | grep -o '"org.opencontainers.image.version":"[^"]*"' | cut -d'"' -f4 || echo "")
10099 if printf '%s\n%s\n' "$LATEST_LABELS" "$VERSION" | sort -V | head -n1 | grep -q "^$VERSION$"; then
101100 SET_LATEST=false
102101 fi
103102 fi
104103 if [[ $SET_LATEST == "true" ]]; then
105- docker tag $IMAGE_REF $ECR_REPOSITORY_FULL :latest
106- docker push $ECR_REPOSITORY_FULL :latest
107- echo "Also tagged as: \`$ECR_REPOSITORY_FULL :latest\`" >> $GITHUB_STEP_SUMMARY
104+ docker tag $IMAGE_REF $ECR_REGISTRY/$ECR_REPOSITORY :latest
105+ docker push $ECR_REGISTRY/$ECR_REPOSITORY :latest
106+ echo "Also tagged as: \`$ECR_REGISTRY/$ECR_REPOSITORY :latest\`" >> $GITHUB_STEP_SUMMARY
108107 fi
109108 fi
110109 fi
0 commit comments