提交 2f4cafb7 编写于 作者: S Sharif Elgamal

remove the gh directory after installation

上级 86fac524
......@@ -21,6 +21,7 @@ curl -qLO "https://github.com/cli/cli/releases/download/v1.6.2/gh_1.6.2_linux_am
tar -xf gh_1.6.2_linux_amd64.tar.gz &&
sudo mv gh_1.6.2_linux_amd64/bin/gh /usr/local/bin/gh
rm gh_1.6.2_linux_amd64.tar.gz
rm -rf gh_1.6.2_linux_amd64
echo "Authorizing bot with gh"
echo "${access_token}" | gh auth login --with-token
......
......@@ -79,12 +79,12 @@ sha=$(echo ${fullsha} | cut -d ":" -f 2)
if [ "$release" = false ]; then
# Comment on the PR with the newly built kicbase
sed_cmd="\`\`\`\\n sed 's|Version = .*|Version = \\\"${KIC_VERSION}\\\"|;s|baseImageSHA = .*|baseImageSHA = \\\"${sha}\\\"|;s|gcrRepo = .*|gcrRepo = \\\"${GCR_REPO}\\\"|;s|dockerhubRepo = .*|dockerhubRepo = \\\"${DH_REPO}\\\"|' pkg/drivers/kic/types.go > new-types.go; mv new-types.go pkg/drivers/kic/types.go; make generate-docs;\\n\`\`\`"
sed_cmd="\`\`\`\n sed 's|Version = .*|Version = \"${KIC_VERSION}\"|;s|baseImageSHA = .*|baseImageSHA = \"${sha}\"|;s|gcrRepo = .*|gcrRepo = \"${GCR_REPO}\"|;s|dockerhubRepo = .*|dockerhubRepo = \"${DH_REPO}\"|' pkg/drivers/kic/types.go > new-types.go; mv new-types.go pkg/drivers/kic/types.go; make generate-docs;\n\`\`\`"
codeblock="\\n\\t// Version is the current version of kic\\n\\tVersion = \\\"${KIC_VERSION}\\\"\\n\\t// SHA of the kic base image\\n\\tbaseImageSHA = \\\"${sha}\\\"\\n\\t// The name of the GCR kicbase repository\\n\\tgcrRepo = \\\"${GCR_REPO}\\\"\\n\\t// The name of the Dockerhub kicbase repository\\n\\tdockerhubRepo = \\\"${DH_REPO}\\\""
codeblock="\n\t// Version is the current version of kic\n\tVersion = \"${KIC_VERSION}\"\n\t// SHA of the kic base image\n\tbaseImageSHA = \"${sha}\"\n\t// The name of the GCR kicbase repository\n\tgcrRepo = \"${GCR_REPO}\"\n\t// The name of the Dockerhub kicbase repository\n\tdockerhubRepo = \"${DH_REPO}\""
# Display the message to the user
message="Hi ${ghprbPullAuthorLoginMention},\\n\\nA new kicbase image is available, please update your PR with the new tag and SHA.\\nIn pkg/drivers/kic/types.go:\\n${codeblock}\\nThen run \`make generate-docs\` to update our documentation to reference the new image.\n\nAlternatively, run the following command and commit the changes:${sed_cmd}\\n"
message="Hi ${ghprbPullAuthorLoginMention},\n\nA new kicbase image is available, please update your PR with the new tag and SHA.\nIn pkg/drivers/kic/types.go:\n${codeblock}\nThen run \`make generate-docs\` to update our documentation to reference the new image.\n\nAlternatively, run the following command and commit the changes:${sed_cmd}\n"
gh pr comment ${ghprbPullId} --body "${message}"
else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册