Skip to content

Commit ddb780e

Browse files
committed
Use GH actions
1 parent 731c911 commit ddb780e

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

.github/workflows/build_docker_builder.yml

+19-10
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,26 @@ jobs:
4747
echo "::set-output name=exists::false"
4848
fi
4949
50+
- name: Set up QEMU
51+
uses: docker/setup-qemu-action@v3
52+
if: steps.image-exists.outputs.exists == 'false'
53+
54+
- name: Set up Docker Buildx
55+
uses: docker/setup-buildx-action@v3
56+
if: steps.image-exists.outputs.exists == 'false'
57+
5058
- uses: actions/checkout@v4
5159
if: steps.image-exists.outputs.exists == 'false'
5260

53-
- name: Build and push Docker image
61+
- name: Build and push
62+
uses: docker/build-push-action@v6
5463
if: steps.image-exists.outputs.exists == 'false'
55-
run: |
56-
export PGLITE_BUILDER_IMAGE_NAME="${DOCKERHUB_REPO}/${IMAGE_NAME}"
57-
export BUILDER_VERSION="${PG_VERSION}-${SDK_VERSION}"
58-
docker buildx build --platform linux/arm64/v8,linux/amd64 --push \
59-
--build-arg PG_VERSION=$PG_VERSION \
60-
--build-arg SDK_VERSION=$SDK_VERSION \
61-
-t ${PGLITE_BUILDER_IMAGE_NAME}:${BUILDER_VERSION} \
62-
-t ${PGLITE_BUILDER_IMAGE_NAME}:latest \
63-
.
64+
with:
65+
platforms: linux/amd64,linux/arm64
66+
push: true
67+
build-args: |
68+
PG_VERSION=${PG_VERSION}
69+
SDK_VERSION=${SDK_VERSION}
70+
tags: |
71+
${PGLITE_BUILDER_IMAGE_NAME}:${BUILDER_VERSION}
72+
${PGLITE_BUILDER_IMAGE_NAME}:latest

0 commit comments

Comments
 (0)