Skip to content

Commit

Permalink
Improve method of deriving repo name from pullspec
Browse files Browse the repository at this point in the history
Theoretically, this works if the IMAGE reference contains a port number.

Co-authored-by: Adam Cmiel <[email protected]>
  • Loading branch information
ralphbean and chmeliik committed Jul 8, 2024
1 parent 1478c32 commit 2f45f1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion task/oci-copy-oci-ta/0.1/oci-copy-oci-ta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ spec:
echo "Extracting artifact_type"
ARTIFACT_TYPE=$(cat "$(pwd)/source/$OCI_COPY_FILE" | yq '.artifact_type')
REPO=$(echo ${IMAGE} | awk -F ':' '{print $1}')
REPO=${IMAGE%:*}
echo "Found that ${REPO} is the repository for ${IMAGE}"
cat >artifact-manifest.json <<EOL
Expand Down
2 changes: 1 addition & 1 deletion task/oci-copy/0.1/oci-copy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ spec:
echo "Extracting artifact_type"
ARTIFACT_TYPE=$(cat "$(pwd)/source/$OCI_COPY_FILE" | yq '.artifact_type')
REPO=$(echo ${IMAGE} | awk -F ':' '{print $1}')
REPO=${IMAGE%:*}
echo "Found that ${REPO} is the repository for ${IMAGE}"
cat >artifact-manifest.json <<EOL
Expand Down

0 comments on commit 2f45f1f

Please sign in to comment.