Skip to content

Commit

Permalink
CI: Ensure pre-existing Docker image is reused
Browse files Browse the repository at this point in the history
GitHub Actions has upgraded Docker to version 23, now employing
BuildKit as the default builder in place of the legacy builder:
actions/runner-images#8003

However, BuildKit doesn't include the information needed to reuse
images for caching. Use the `--build-arg BUILDKIT_INLINE_CACHE=1`
flag to fix this.
  • Loading branch information
kleisauke committed Aug 15, 2023
1 parent e7a07b8 commit e0b8d32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ done
for flavour in linux-x64 linux-arm linux-arm64 linux-musl-x64 linux-musl-arm64; do
if [ $PLATFORM = "all" ] || [ $PLATFORM = $flavour ]; then
echo "Building $flavour..."
docker build --cache-from vips-dev-$flavour -t vips-dev-$flavour $flavour
docker build --cache-from vips-dev-$flavour --build-arg BUILDKIT_INLINE_CACHE=1 -t vips-dev-$flavour $flavour
docker run --rm -e "VERSION_VIPS=$VERSION_VIPS" -e VERSION_LATEST_REQUIRED -v $PWD:/packaging vips-dev-$flavour sh -c "/packaging/build/lin.sh"
fi
done

0 comments on commit e0b8d32

Please sign in to comment.