From 93fcaffaaa80588830e9116e9f0bd96817ad848a Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Fri, 30 Apr 2021 18:53:20 +0300 Subject: [PATCH] Makefile: add simple image-push target And use it in workflow. --- .github/workflows/publish_to_dockerhub.yml | 4 +++- Makefile | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish_to_dockerhub.yml b/.github/workflows/publish_to_dockerhub.yml index c44d409..9e9d591 100644 --- a/.github/workflows/publish_to_dockerhub.yml +++ b/.github/workflows/publish_to_dockerhub.yml @@ -79,4 +79,6 @@ jobs: - name: Push image with 'latest' tag to registry if: ${{ github.event_name == 'release' && github.event.release.target_commitish == 'master' }} - run: make image-push-latest + run: make image-push + env: + HUB_TAG: latest diff --git a/Makefile b/Makefile index 77c7436..93a120d 100644 --- a/Makefile +++ b/Makefile @@ -66,6 +66,11 @@ image: -f Dockerfile \ -t $(HUB_IMAGE):$(HUB_TAG) . +# Push Docker image to the hub +image-push: + @echo "⇒ Publish image" + @docker push $(HUB_IMAGE):$(HUB_TAG) + # Build dirty Docker image dirty-image: @echo "⇒ Build NeoFS HTTP Gateway dirty docker image "