prepare for multi-CI
split things out so more can be shared between CIs
This commit is contained in:
parent
7a8122c5f4
commit
6b517528ee
7 changed files with 53 additions and 45 deletions
11
push-all
11
push-all
|
@ -1,12 +1,15 @@
|
|||
#!/bin/sh -eu
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Usage: ./push-all <registry-prefix> <image-tag>
|
||||
set -euo pipefail
|
||||
|
||||
: "${REGISTRY_URL:=nixpkgs}"
|
||||
: "${IMAGE_TAG:=latest}"
|
||||
registry_prefix=${1:-nixpkgs}
|
||||
image_tag=${2:-latest}
|
||||
|
||||
releases_json=$(nix-instantiate ./release.nix --strict --eval --json)
|
||||
|
||||
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_URL/$attr:$IMAGE_TAG"
|
||||
skopeo copy "docker-archive://$file" "docker://$registry_prefix/$attr:$image_tag"
|
||||
done
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue