Build alpine Docker images in CI when linux/amd64 is in platform list (#1141)

This commit is contained in:
Wes Morgan 2022-01-13 13:26:31 -07:00 committed by GitHub
parent 2f6d363ee8
commit 5ff1a04f10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 12 deletions

View file

@ -43,10 +43,9 @@ if [ -z "$CIRCLE_PULL_REQUEST" ] && [ "$CIRCLE_BRANCH" = "master" ]; then
rm -rf $p
done
# alpine doesn't provide upstream arm64 images yet
if [[ $platform == "linux-amd64" ]]; then
tar zxvf "/tmp/release/babashka-${image_tag}-${platform}-static.tar.gz"
docker build -t "$image_name:alpine" "${label_args[@]}" -f Dockerfile.alpine .
# build alpine image for linux-amd64 only (no upstream arm64 support yet)
tar zxvf "/tmp/release/babashka-${image_tag}-linux-amd64-static.tar.gz"
docker buildx build -t "$image_name:alpine" --platform=linux/amd64 "${label_args[@]}" -f Dockerfile.alpine .
rm -f bb
docker tag "$image_name:alpine" "$image_name:$image_tag-alpine"
echo "Pushing image $image_name:$image_tag-alpine"
@ -55,7 +54,6 @@ if [ -z "$CIRCLE_PULL_REQUEST" ] && [ "$CIRCLE_BRANCH" = "master" ]; then
echo "Pushing image $image_name:alpine"
docker push "$image_name:alpine"
fi
fi
else
echo "Not publishing Docker image"
fi

View file

@ -5,6 +5,7 @@ For a list of breaking changes, check [here](#breaking-changes).
## Unreleased
- Add opencontainers annoations to docker image [#1134](https://github.com/babashka/babashka/issues/1134)
- Fix Alpine Linux Docker images in CI script [#1140](https://github.com/babashka/babashka/issues/1140)
## 0.7.3 (2021-12-30)