14 lines
314 B
Bash
Executable File
14 lines
314 B
Bash
Executable File
#!/usr/bin/env /bin/bash
|
|
|
|
# If in CI use caching
|
|
if [[ -n "${CI}" ]]; then
|
|
docker buildx build \
|
|
--load \
|
|
-t $IMAGE_NAME \
|
|
--cache-to type=gha,mode=max,scope=$GITHUB_REF_NAME-$IMAGE_NAME \
|
|
--cache-from type=gha,scope=$GITHUB_REF_NAME-$IMAGE_NAME "$@"
|
|
else
|
|
docker build -t $IMAGE_NAME "$@"
|
|
fi
|
|
|