Fix README.md publication and tag cleanup for DockerHub
parent
d158632452
commit
55460035f7
|
@ -52,7 +52,7 @@ func (d *Docker) Manifest(tag, amd64tag, arm32v7tag, arm64v8tag string) error {
|
|||
|
||||
// CleanTag remove a tag from dockerhub.
|
||||
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.
|
||||
|
|
Loading…
Reference in New Issue