File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -110,8 +110,8 @@ runs:
110
110
DIGEST=${IMAGE_REPO_DIGEST#*@}
111
111
112
112
# URL encode the digest and image repository, needed for the purl
113
- URLENCODED_DIGEST=$(echo "$DIGEST" | jq -Rr @uri)
114
- URLENCODED_IMAGE_REPOSITORY=$(echo "$IMAGE_REPOSITORY" | jq -Rr @uri)
113
+ URLENCODED_DIGEST=$(jq -rn --arg input "$DIGEST" '$input | @uri' )
114
+ URLENCODED_IMAGE_REPOSITORY=$(jq -rn --arg input "$IMAGE_REPOSITORY" '$input | @uri' )
115
115
# Last item, split by /
116
116
# Example: sdp/kafka -> kafka
117
117
SOURCE_NAME=$(echo "$IMAGE_REPOSITORY" | awk -F'/' '{print $NF}')
@@ -122,7 +122,7 @@ runs:
122
122
exit 1
123
123
fi
124
124
# Construct the package url (purl)
125
- PURL="pkg:oci/$SOURCE_NAME@ $URLENCODED_DIGEST?arch=${ARCH}&repository_url=${REGISTRY_URI}%2F${URLENCODED_IMAGE_REPOSITORY}"
125
+ PURL="pkg:oci/{ $SOURCE_NAME}@{ $URLENCODED_DIGEST} ?arch=${ARCH}&repository_url=${REGISTRY_URI}%2F${URLENCODED_IMAGE_REPOSITORY}"
126
126
127
127
# Get metadata from the image
128
128
# NOTE (@Techassi): Maybe we should run this command only once
You can’t perform that action at this time.
0 commit comments