docker-nixpkgs/dockerhub-image-matrix
zimbatm a720d8ee4f
remove 19.03 and 19.09 channels
Those are not receiving any more updates. Fix Nix invocations.
2020-07-07 13:00:21 +02:00

32 lines
781 B
Bash
Executable file

#!/usr/bin/env bash
#
# Usage: ./dockerhub-image-matrix
set -euo pipefail
microbadge() {
local name=$1
local tag=${2:-latest}
if [[ $tag != latest ]]; then
name=$name:$tag
fi
local homepage=https://microbadger.com/images/$name
# make sure that microbadger has loaded the image
curl -o /dev/null -sfL "$homepage"
echo "[![](https://images.microbadger.com/badges/image/$name.svg)]($homepage)"
}
## Main ##
releases_json=$(nix-instantiate --strict --eval --json)
echo "| Image / Tag | latest | nixos-20.03 |"
echo "| --- | --- | --- |"
for attr in $(echo "$releases_json" | jq -r "keys[]") ; do
name=nixpkgs/$attr
echo "| [$name](https://hub.docker.com/r/$name) | $(microbadge "$name") | $(microbadge "$name" "nixos-20.03") |"
done