Skip to content

Commit

Permalink
Merge pull request #5 from IamMrCupp:dev
Browse files Browse the repository at this point in the history
Makefile Modifications
  • Loading branch information
IamMrCupp authored Jul 20, 2021
2 parents db288ae + 2923b9d commit efa18bf
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
23 changes: 21 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,25 @@
export DOCKER_BUILDKIT=1

# git related stuff here
GIT_REPO?=esp_project
GIT_TAG?=$(shell git rev-parse --short HEAD)
GIT_REPO?=$(shell git rev-parse --show-toplevel | awk -F '/' '{print $$NF}')

# Docker stuff
HUB_USER?=iammrcupp
HUB_REPO?=${GIT_REPO}
HUB_PULL_SECRET?=$(shell docker secret list | grep DockerHub | cut -f1 -d' ')
TAG?=${GIT_TAG}
# for local dev
DEV_LOCAL_IMAGE?=${HUB_REPO}:edge
# images for docker hub
DEV_IMAGE?=${HUB_USER}/${HUB_REPO}:edge
PROD_IMAGE?=${HUB_USER}/${HUB_REPO}:${TAG}
PROD_IMAGE_LATEST?=${HUB_USER}/${HUB_REPO}:latest
# images for ghcr.io
GHCR_DEV_IMAGE?=${HUB_USER}/${HUB_REPO}:edge
GHCR_PROD_IMAGE?=${HUB_USER}/${HUB_REPO}:${TAG}
GHCR_PROD_IMAGE_LATEST?=${HUB_USER}/${HUB_REPO}:latest

BUILDX_PLATFORMS?=linux/amd64,linux/arm64,linux/arm/v7

###############################################################################
Expand Down Expand Up @@ -93,4 +100,16 @@ cross-build-latest:

cross-build-dev:
@docker buildx create --name mutiarchbuilder --use
@docker buildx build --platform ${BUILDX_PLATFORMS} -t ${DEV_IMAGE} .
@docker buildx build --platform ${BUILDX_PLATFORMS} -t ${DEV_IMAGE} --push .

cross-build-ghcr:
@docker buildx create --name mutiarchbuilder --use
@docker buildx build --platform ${BUILDX_PLATFORMS} -t ${GHCR_PROD_IMAGE} -t ${GHCR_PROD_IMAGE_LATEST} --push .

cross-build-latest-ghcr:
@docker buildx create --name mutiarchbuilder --use
@docker buildx build --platform ${BUILDX_PLATFORMS} -t ${GHCR_PROD_IMAGE_LATEST} --push .

cross-build-dev-ghcr:
@docker buildx create --name mutiarchbuilder --use
@docker buildx build --platform ${BUILDX_PLATFORMS} -t ${GHCR_DEV_IMAGE} --push .
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
MASTER: [![CircleCI](https://circleci.com/gh/IamMrCupp/esp-project/tree/master.svg?style=svg)](https://circleci.com/gh/IamMrCupp/esp-project/tree/master)
DEV: [![CircleCI](https://circleci.com/gh/IamMrCupp/esp-project/tree/master.svg?style=svg)](https://circleci.com/gh/IamMrCupp/esp-project/tree/dev)
MASTER: [![CircleCI](https://circleci.com/gh/IamMrCupp/esp_project/tree/master.svg?style=svg)](https://circleci.com/gh/IamMrCupp/esp_project/tree/master)
DEV: [![CircleCI](https://circleci.com/gh/IamMrCupp/esp_project/tree/master.svg?style=svg)](https://circleci.com/gh/IamMrCupp/esp_project/tree/dev)


**Emotional Support Pizza**
Expand Down

0 comments on commit efa18bf

Please sign in to comment.