From 2c3bc4a13366de920ae2297936e5dc17e94e133b Mon Sep 17 00:00:00 2001 From: Amir Zarrinkafsh Date: Thu, 5 Aug 2021 16:36:45 +1000 Subject: [PATCH] fix(cmd): remove microbadger references (#2243) MicroBadger is dead, so we need to remove all references of it. --- README.md | 2 +- cmd/authelia-scripts/cmd_docker.go | 8 -------- cmd/authelia-scripts/docker.go | 5 ----- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/README.md b/README.md index da5d37c50..e56bbdeb8 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Build](https://img.shields.io/buildkite/d6543d3ece3433f46dbe5fd9fcfaf1f68a6dbc48eb1048bc22/master?logo=buildkite&style=flat-square&color=brightgreen)](https://buildkite.com/authelia/authelia) [![Go Report Card](https://goreportcard.com/badge/github.com/authelia/authelia?logo=go&style=flat-square)](https://goreportcard.com/report/github.com/authelia/authelia) - [![Docker Tag](https://img.shields.io/docker/v/authelia/authelia/latest?logo=docker&style=flat-square&color=blue&sort=semver)](https://microbadger.com/images/authelia/authelia) + [![Docker Tag](https://img.shields.io/docker/v/authelia/authelia/latest?logo=docker&style=flat-square&color=blue&sort=semver)](https://hub.docker.com/r/authelia/authelia/tags) [![Docker Size](https://img.shields.io/docker/image-size/authelia/authelia/latest?logo=docker&style=flat-square&color=blue&sort=semver)](https://hub.docker.com/r/authelia/authelia/tags) [![GitHub Release](https://img.shields.io/github/release/authelia/authelia.svg?logo=github&style=flat-square&color=blue)](https://github.com/authelia/authelia/releases) [![AUR source version](https://img.shields.io/aur/version/authelia?logo=arch-linux&label=authelia&style=flat-square&color=blue)](https://aur.archlinux.org/packages/authelia/) diff --git a/cmd/authelia-scripts/cmd_docker.go b/cmd/authelia-scripts/cmd_docker.go index 371210f25..ef464750d 100644 --- a/cmd/authelia-scripts/cmd_docker.go +++ b/cmd/authelia-scripts/cmd_docker.go @@ -239,7 +239,6 @@ func publishDockerManifest() { if registry == dockerhub { publishDockerReadme(docker) - updateMicroBadger(docker) } } } else { @@ -271,10 +270,3 @@ func publishDockerReadme(docker *Docker) { log.Fatal(err) } } -func updateMicroBadger(docker *Docker) { - log.Info("Updating MicroBadger metadata from Docker Hub") - - if err := docker.UpdateMicroBadger(); err != nil { - log.Fatal(err) - } -} diff --git a/cmd/authelia-scripts/docker.go b/cmd/authelia-scripts/docker.go index 4371643d2..60add2d13 100644 --- a/cmd/authelia-scripts/docker.go +++ b/cmd/authelia-scripts/docker.go @@ -62,8 +62,3 @@ func (d *Docker) CleanTag(tag string) error { 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. -func (d *Docker) UpdateMicroBadger() error { - return utils.CommandWithStdout("curl", "-fs", "--retry", "3", "-X", "POST", "https://hooks.microbadger.com/images/authelia/authelia/6b8tWohGJpS4CbbPCgUHxVe_uY4=").Run() -}