This repository has been archived on 2024-10-30. You can view files and clone it, but cannot push or open issues or pull requests.
concourse-oci-resource/src/out

12 lines
333 B
Bash
Executable file

#!/usr/bin/env sh
set -eu
[ -e /opt/resource/common ] && cd /opt/resource
. ./common
IMAGE_REFS_FILE="$(mktemp -t)"
oci_dir="$(mktemp -d)"
pushd "$oci_dir" && tar xf "$1/$(jq -r .params.image < "$INPUT_FILE")" && popd
crane push "$oci_dir" "$REPOSITORY:$TAG" --image-refs="$IMAGE_REFS_FILE"
sed 's/^[^@]*@//' < "$IMAGE_REFS_FILE"