Fix README.md publication and tag cleanup for DockerHub

pull/490/head
Amir Zarrinkafsh 2019-12-09 09:50:03 +11:00 committed by Clément Michaud
parent d158632452
commit 55460035f7
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ func (d *Docker) Manifest(tag, amd64tag, arm32v7tag, arm64v8tag string) error {
// CleanTag remove a tag from dockerhub. // CleanTag remove a tag from dockerhub.
func (d *Docker) CleanTag(tag string) error { func (d *Docker) CleanTag(tag string) error {
return utils.CommandWithStdout("bash", "-c", `token=$(curl -fs --retry 3 -H "Content-Type: application/json" -X "POST" -d '{"username": "'$DOCKER_USERNAME'", "password": "'$DOCKER_PASSWORD'"}' https://hub.docker.com/v2/users/login/ | jq -r .token) && curl -fs --retry 3 -o /dev/null -L -X "DELETE" -H "Authorization: JWT $token" https://hub.docker.com/v2/repositories/"+DockerImageName+"/tags/"+tag+"/`).Run() return utils.CommandWithStdout("bash", "-c", `token=$(curl -fs --retry 3 -H "Content-Type: application/json" -X "POST" -d '{"username": "'$DOCKER_USERNAME'", "password": "'$DOCKER_PASSWORD'"}' https://hub.docker.com/v2/users/login/ | jq -r .token) && curl -fs --retry 3 -o /dev/null -L -X "DELETE" -H "Authorization: JWT $token" https://hub.docker.com/v2/repositories/`+DockerImageName+"/tags/"+tag+"/").Run()
} }
// PublishReadme push README.md to dockerhub. // PublishReadme push README.md to dockerhub.