From 67b88314619dae55465057fe39b43586bf3b6df7 Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Tue, 28 Sep 2021 14:08:46 -0700 Subject: [PATCH] Update mirror images to take target image name Allow overwriting the target tag to support mirror images from multiple sources under our single namespace. Signed-off-by: Derek McGowan --- .github/workflows/images.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/images.yml b/.github/workflows/images.yml index 90193c35c..55562a34f 100644 --- a/.github/workflows/images.yml +++ b/.github/workflows/images.yml @@ -6,6 +6,9 @@ on: description: "Upstream image to mirror" required: true default: "docker.io/library/busybox:1.32" + image: + description: "Target image name (override)" + jobs: mirror: @@ -56,7 +59,12 @@ jobs: sleep 5 upstream=${{ github.event.inputs.upstream }} - mirror="ghcr.io/containerd/${upstream##*/}" + target=${{ github.event.inputs.image }} + if [[ "$target" == "" ]]; then + mirror="ghcr.io/containerd/${upstream##*/}" + else + mirror="ghcr.io/containerd/${target}" + fi echo "Mirroring $upstream to $mirror"