12 lines
333 B
Bash
Executable file
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"
|