From 6965d068544d6cd0985444c2263dcbb64df72568 Mon Sep 17 00:00:00 2001 From: Amir Zarrinkafsh Date: Mon, 25 Jan 2021 10:05:28 +1100 Subject: [PATCH] [CI] Fix DockerHub README update (#1628) Since introducing the All Contributors spec for our README.md we have been unable to sync and update the README to DockerHub. This is because DockerHub has a 25000 character limit and the All Contributors spec exceeds this. So we retain a similar README to the prior for the contributors section only for DockerHub. --- cmd/authelia-scripts/docker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/authelia-scripts/docker.go b/cmd/authelia-scripts/docker.go index b388eb400..508ed3aa6 100644 --- a/cmd/authelia-scripts/docker.go +++ b/cmd/authelia-scripts/docker.go @@ -59,7 +59,7 @@ func (d *Docker) CleanTag(tag string) error { // PublishReadme push README.md to dockerhub. func (d *Docker) PublishReadme() 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) && jq -n --arg msg "$(cat README.md | sed -r 's/(\' | sed '/Thanks goes to/,/### Backers/{/### Backers/!d}')" '{"registry":"registry-1.docker.io","full_description": $msg }' | curl -fs --retry 3 -o /dev/null -L -X "PATCH" -H "Content-Type: application/json" -H "Authorization: JWT $token" -d @- https://hub.docker.com/v2/repositories/authelia/authelia/`).Run() } // UpdateMicroBadger updates MicroBadger metadata based on dockerhub.