2018-10-02 17:03:32 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
. $(dirname $0)/util
|
2020-11-23 18:27:49 +00:00
|
|
|
set -e
|
2018-10-02 17:03:32 +00:00
|
|
|
|
|
|
|
: ${PLATFORMS=linux/arm}
|
|
|
|
|
2019-08-08 00:50:00 +00:00
|
|
|
importCacheFlags=""
|
2020-11-23 18:27:49 +00:00
|
|
|
exportCacheFlags=""
|
2020-11-26 18:02:04 +00:00
|
|
|
if [ "$GITHUB_ACTIONS" = "true" ]; then
|
2020-11-29 05:45:33 +00:00
|
|
|
if [ -n "$cacheRefFrom" ]; then
|
|
|
|
importCacheFlags="--cache-from=type=local,src=$cacheRefFrom"
|
|
|
|
fi
|
|
|
|
if [ -n "$cacheRefTo" ]; then
|
|
|
|
exportCacheFlags="--cache-to=type=local,dest=$cacheRefTo"
|
2020-11-23 18:27:49 +00:00
|
|
|
fi
|
2019-08-08 00:50:00 +00:00
|
|
|
fi
|
|
|
|
|
2020-11-23 18:27:49 +00:00
|
|
|
if [ -n "$RUNC_PLATFORMS" ]; then
|
2020-11-26 18:02:04 +00:00
|
|
|
buildxCmd build $importCacheFlags $exportCacheFlags \
|
2020-11-23 18:27:49 +00:00
|
|
|
--target "binaries-linux-helper" \
|
|
|
|
--platform "$RUNC_PLATFORMS" \
|
|
|
|
$currentcontext
|
|
|
|
fi
|
2020-01-31 04:21:40 +00:00
|
|
|
|
2020-11-23 18:27:49 +00:00
|
|
|
buildxCmd build $importCacheFlags \
|
|
|
|
--platform "$PLATFORMS" \
|
|
|
|
$currentcontext
|