diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b4f6941..65007e4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -42,9 +42,12 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Build docker image + - name: Build base image working-directory: ./twemproxy - run: ls -la; pwd; make -f ../Makefile build IMAGE_NAME=${{ env.IMAGE }} IMAGE_TAG=${{ inputs.tag }} + run: make -f ../Makefile build IMAGE_NAME=nutcracker IMAGE_TAG=${{ inputs.tag }} + + - name: Build final image + run: make -f ../Makefile build IMAGE_NAME=${{ env.IMAGE }} IMAGE_TAG=${{ inputs.tag }} ARGS="--build-arg BUILDER=nutcracker:${{ inputs.tag }}" - name: Push docker image working-directory: ./twemproxy diff --git a/Makefile b/Makefile index 6c86b9c..dfe0ff8 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ IMAGE := $(IMAGE_NAME):$(IMAGE_TAG) all: build push build: - docker build . -t $(IMAGE) + docker build . -t $(IMAGE) $(ARGS) push: - docker push $(IMAGE) + docker push $(IMAGE) $(ARGS)