From 247d445b5477b3d81689e06842e5757eaedb82a1 Mon Sep 17 00:00:00 2001 From: Gorka Guridi Date: Tue, 6 Dec 2022 11:23:37 +0000 Subject: [PATCH] Publish directly with buildx. --- .github/workflows/main.yml | 2 +- package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 71f0e25..f62c7b6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -62,4 +62,4 @@ jobs: KAFKA_IMAGE: "gguridi/kafka:${{ matrix.scala_version }}-${{ matrix.kafka_version }}" SCALA_VERSION: ${{ matrix.scala_version }} KAFKA_VERSION: ${{ matrix.kafka_version }} - run: yarn run publish + run: yarn run publish-multiarch diff --git a/package.json b/package.json index 51cbcef..87f2cba 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "scripts": { "start": "mockserver -p 80 -q -m /opt/api", "build": "docker build -t $KAFKA_IMAGE --build-arg SCALA_VERSION=$SCALA_VERSION --build-arg KAFKA_VERSION=$KAFKA_VERSION .", - "build-multiarch": "docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 -t $KAFKA_IMAGE --build-arg SCALA_VERSION=$SCALA_VERSION --build-arg KAFKA_VERSION=$KAFKA_VERSION .", - "publish": "yarn run build-multiarch && docker push $KAFKA_IMAGE", + "publish-multiarch": "docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 -t $KAFKA_IMAGE --build-arg SCALA_VERSION=$SCALA_VERSION --build-arg KAFKA_VERSION=$KAFKA_VERSION .", + "publish": "yarn run build && docker push $KAFKA_IMAGE", "docker-run": "docker run --name kafka-local -d -p 2181:2181 -p 9092:9092 -e KAFKA__ADVERTISED_HOST_NAME=localhost -e KAFKA__ADVERTISED_LISTENERS=PLAINTEXT://localhost:9092 $KAFKA_IMAGE", "docker-stop": "docker rm -f kafka-local || true", "test": "node ./node_modules/jest/bin/jest.js --forceExit --detectOpenHandles"