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.
23 lines
444 B
23 lines
444 B
1 year ago
|
#!/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[*]}"
|
||
|
}
|