From ae3c12076010e7043c3c5ae5bb5c44b89887b1dc Mon Sep 17 00:00:00 2001 From: Naoki MATSUMOTO Date: Thu, 9 Nov 2023 16:17:17 +0900 Subject: [PATCH] fix --- .github/workflows/publish-image.yaml | 3 +-- Makefile | 11 ++++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish-image.yaml b/.github/workflows/publish-image.yaml index 4c53c49..df2f0e3 100644 --- a/.github/workflows/publish-image.yaml +++ b/.github/workflows/publish-image.yaml @@ -11,8 +11,7 @@ jobs: runs-on: ubuntu-latest env: STAGINGVERSION: ${{ github.ref_name }} - DOCKER_BUILD_ARGS: --push - PUSH_LATEST: true + PUBLISH_IMAGE: true steps: - uses: actions/checkout@v4 - uses: docker/setup-buildx-action@v1 diff --git a/Makefile b/Makefile index b6098b5..6881065 100755 --- a/Makefile +++ b/Makefile @@ -28,14 +28,13 @@ DRIVER_IMAGE = ${REGISTRY}/${DRIVER_BINARY} STARTER_IMAGE = ${REGISTRY}/${STARTER_BINARY} EXAMPLE_IMAGE = ${REGISTRY}/mfcp-example -DOCKER_BUILD_ARGS ?= --load -DOCKER_BUILD_ARGS += --build-arg STAGINGVERSION=${STAGINGVERSION} +DOCKER_BUILD_ARGS ?= --load --build-arg STAGINGVERSION=${STAGINGVERSION} ifneq ("$(shell docker buildx build --help | grep 'provenance')", "") DOCKER_BUILD_ARGS += --provenance=false endif LOAD_TO_KIND ?= false -PUSH_LATEST ?= false +PUBLISH_IMAGE ?= false $(info STAGINGVERSION is ${STAGINGVERSION}) $(info DRIVER_IMAGE is ${DRIVER_IMAGE}) @@ -63,7 +62,8 @@ build-driver: --file ./cmd/csi_driver/Dockerfile \ --tag ${IMAGE_NAME} \ --platform linux/amd64 . - if [ "${PUSH_LATEST}" = "true" ]; then \ + if [ "${PUBLISH_IMAGE}" = "true" ]; then \ + docker push ${IMAGE_NAME}; \ docker tag ${IMAGE_NAME} ${DRIVER_IMAGE}:latest; \ docker push ${DRIVER_IMAGE}:latest; \ fi @@ -85,7 +85,8 @@ build-example-$(1)-$(2): --file ./examples/$1/$2/Dockerfile \ --tag ${IMAGE_NAME} \ --platform linux/amd64 . - if [ "${PUSH_LATEST}" = "true" ]; then \ + if [ "${PUBLISH_IMAGE}" = "true" ]; then \ + docker push ${IMAGE_NAME}; \ docker tag ${IMAGE_NAME} ${EXAMPLE_IMAGE}-$1-$2:latest; \ docker push ${IMAGE_NAME_LATEST}; \ fi