It seems that ${CI_COMMIT_REF_SLUG} doesn't work well as part of script.
${CI_COMMIT_REF_SLUG}
script