update DockerHub info

create a script that automatically updates the DockerHub project pages
This commit is contained in:
zimbatm 2019-02-13 18:30:15 +01:00
parent 9baba96f89
commit e97a236529
No known key found for this signature in database
GPG key ID: 71BAF6D40C1D63D7
6 changed files with 95 additions and 18 deletions

View file

@ -1,15 +1,20 @@
#!/usr/bin/env bash
#
# Usage: ./push-all <registry-prefix> <image-tag>
# Usage: ./push-all <registry> <image-prefix> <image-tag>
set -euo pipefail
registry_prefix=${1:-nixpkgs}
image_tag=${2:-latest}
registry=${1:-docker.io}
image_prefix=${2:-nixpkgs}
image_tag=${3:-latest}
releases_json=$(nix-instantiate ./release.nix --strict --eval --json)
echo "=== Pushing images to $registry"
for attr in $(echo "$releases_json" | jq -r "keys[]") ; do
file=$(echo "$releases_json" | jq -r ".\"$attr\"")
echo "--- $attr -> $file"
skopeo copy "docker-archive://$file" "docker://$registry_prefix/$attr:$image_tag"
skopeo copy "docker-archive://$file" "docker://$registry/$image_prefix/$attr:$image_tag"
done
echo OK