Skip to content

Commit

Permalink
updated regctl pull
Browse files Browse the repository at this point in the history
  • Loading branch information
amankong committed Oct 30, 2024
1 parent 32d12bf commit 38db038
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/scripts/sync_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ function get_upstream_tags {
# Function to pull an image or OCI artifact using regctl
function pull_artifact {
echo "Pulling $type from $source with regctl..."
regctl image copy "$owner/$repo:$tag" "local/$REPOSITORY:$tag"
regctl image copy "$owner/$repo:$tag" "$FULL_ECR_URI/$REPOSITORY:$tag"
}

# Function to push an image or OCI artifact to ECR using regctl
function push_artifact {
echo "Pushing $type to ECR with regctl..."
regctl image copy "local/$REPOSITORY:$tag" "$FULL_ECR_URI/$REPOSITORY:$tag"
}
# # Function to push an image or OCI artifact to ECR using regctl
# function push_artifact {
# echo "Pushing $type to ECR with regctl..."
# regctl image copy "local/$REPOSITORY:$tag" "$FULL_ECR_URI/$REPOSITORY:$tag"
# }

# Main script
CONFIG_FILE=".github/imageList.yml"
Expand All @@ -61,7 +61,7 @@ echo "$IMAGES" | while IFS="|" read -r name type source owner repo current_tag s
REPOSITORY="$name"

# Check or create the repository in ECR Public
check_or_create_repository
# check_or_create_repository

# Get the upstream tags greater than the current version
tag=$(get_upstream_tags)
Expand All @@ -73,7 +73,7 @@ echo "$IMAGES" | while IFS="|" read -r name type source owner repo current_tag s
pull_artifact

# Push the artifact to the ECR Public repository
push_artifact
# push_artifact
else
echo "No new version found for $name."
fi
Expand Down

0 comments on commit 38db038

Please sign in to comment.