Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
naoki9911 committed Nov 9, 2023
1 parent 384ce3f commit ae3c120
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/publish-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit ae3c120

Please sign in to comment.