You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
444 B
22 lines
444 B
#!/bin/bash |
|
set -euxo pipefail |
|
|
|
function image_tag() { |
|
name="$1" |
|
echo "ghcr.io/${GITHUB_REPOSITORY:-nextcloud/neon}/$name" |
|
} |
|
|
|
function cache_build_args() { |
|
tag="$1" |
|
build_args=("--cache-from" "type=registry,ref=$tag") |
|
if [ -v GITHUB_REPOSITORY ]; then |
|
build_args+=( |
|
"--push" |
|
"--cache-to" "type=registry,ref=$tag,mode=max" |
|
) |
|
else |
|
build_args+=("--load") |
|
fi |
|
|
|
echo "${build_args[*]}" |
|
}
|
|
|