diff --git a/Makefile b/Makefile index 90c50ac..ef152ec 100644 --- a/Makefile +++ b/Makefile @@ -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 ############################################################################### @@ -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} . \ No newline at end of file + @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 . diff --git a/README.md b/README.md index 5faacce..5f6937e 100644 --- a/README.md +++ b/README.md @@ -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**