local-build: Remove $HOME/.docker/buildx/activity/default

The file can be removed between builds without causing any issue, and
leaving it around has been causing us some headache due to:
```
ERROR: open /home/runner/.docker/buildx/activity/default: permission denied
```

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
Fabiano Fidêncio 2023-08-28 13:07:42 +02:00
parent d1b54ede29
commit 3818bf3311

View File

@ -32,6 +32,11 @@ TARGET_ARCH=${TARGET_ARCH:-$(uname -m)}
TARGET_OS=${TARGET_OS:-linux}
TARGET_ARCH=${TARGET_ARCH:-$ARCH}
# We've seen issues related to the /home/runner/.docker/buildx/activity/default file
# constantly being with the wrong permissions.
# Let's just remove the file before we build.
rm -f $HOME/.docker/buildx/activity/default
[ "${CROSS_BUILD}" == "true" ] && BUILDX="buildx" && PLATFORM="--platform=${TARGET_OS}/${TARGET_ARCH}"
if [ "${CROSS_BUILD}" == "true" ]; then
# check if the current docker support docker buildx