Skip to content

Commit

Permalink
Build from builder image
Browse files Browse the repository at this point in the history
  • Loading branch information
caruccio committed Jul 10, 2024
1 parent 10de0ae commit 3af7b68
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 3af7b68

Please sign in to comment.