RafikFarhad / push-to-gcr-github-action

An action that build docker image and push to Google Cloud Registry and Google Artifact Registry.
MIT License
68 stars 37 forks source link

If image_tag input is separated with ", " no push occurs #20

Closed thedmeyer closed 2 years ago

thedmeyer commented 3 years ago

If the image_tag variable has an input like below, a push never occurs and no error is given.

image_tag: latest, another-tag

Is this correct behavior, to assume a true CSV input? such that:

image_tag: latest,another-tag
function split_csv() {
    IFS=','
    csv_data=$1
    local -n global_list_array=$2
    for i in $csv_data; do
        global_list_array+=($i)
    done
    unset IFS
}
RafikFarhad commented 3 years ago

Hi @thedmeyer, thanks for using this action. If the input is not a CSV or contains unsupported character (in this case whitespace) then this action should throw error. I'll fix this behaviour soon. Thanks for reporting.

RafikFarhad commented 2 years ago

Hi @thedmeyer, this issue has been handled from v4.1. Now the action will try to sanitize the image name by removing whitespaces and empty tag names. Also, latest will be used when the tag_names is un-parsable. Thanks for reporting the issue.