Skip to content

Commit efa18bf

Browse files
authored
Merge pull request #5 from IamMrCupp:dev
Makefile Modifications
2 parents db288ae + 2923b9d commit efa18bf

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

Makefile

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,25 @@
99
export DOCKER_BUILDKIT=1
1010

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

1515
# Docker stuff
1616
HUB_USER?=iammrcupp
1717
HUB_REPO?=${GIT_REPO}
1818
HUB_PULL_SECRET?=$(shell docker secret list | grep DockerHub | cut -f1 -d' ')
1919
TAG?=${GIT_TAG}
20+
# for local dev
2021
DEV_LOCAL_IMAGE?=${HUB_REPO}:edge
22+
# images for docker hub
2123
DEV_IMAGE?=${HUB_USER}/${HUB_REPO}:edge
2224
PROD_IMAGE?=${HUB_USER}/${HUB_REPO}:${TAG}
2325
PROD_IMAGE_LATEST?=${HUB_USER}/${HUB_REPO}:latest
26+
# images for ghcr.io
27+
GHCR_DEV_IMAGE?=${HUB_USER}/${HUB_REPO}:edge
28+
GHCR_PROD_IMAGE?=${HUB_USER}/${HUB_REPO}:${TAG}
29+
GHCR_PROD_IMAGE_LATEST?=${HUB_USER}/${HUB_REPO}:latest
30+
2431
BUILDX_PLATFORMS?=linux/amd64,linux/arm64,linux/arm/v7
2532

2633
###############################################################################
@@ -93,4 +100,16 @@ cross-build-latest:
93100

94101
cross-build-dev:
95102
@docker buildx create --name mutiarchbuilder --use
96-
@docker buildx build --platform ${BUILDX_PLATFORMS} -t ${DEV_IMAGE} .
103+
@docker buildx build --platform ${BUILDX_PLATFORMS} -t ${DEV_IMAGE} --push .
104+
105+
cross-build-ghcr:
106+
@docker buildx create --name mutiarchbuilder --use
107+
@docker buildx build --platform ${BUILDX_PLATFORMS} -t ${GHCR_PROD_IMAGE} -t ${GHCR_PROD_IMAGE_LATEST} --push .
108+
109+
cross-build-latest-ghcr:
110+
@docker buildx create --name mutiarchbuilder --use
111+
@docker buildx build --platform ${BUILDX_PLATFORMS} -t ${GHCR_PROD_IMAGE_LATEST} --push .
112+
113+
cross-build-dev-ghcr:
114+
@docker buildx create --name mutiarchbuilder --use
115+
@docker buildx build --platform ${BUILDX_PLATFORMS} -t ${GHCR_DEV_IMAGE} --push .

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
MASTER: [![CircleCI](https://circleci.com/gh/IamMrCupp/esp-project/tree/master.svg?style=svg)](https://circleci.com/gh/IamMrCupp/esp-project/tree/master)
2-
DEV: [![CircleCI](https://circleci.com/gh/IamMrCupp/esp-project/tree/master.svg?style=svg)](https://circleci.com/gh/IamMrCupp/esp-project/tree/dev)
1+
MASTER: [![CircleCI](https://circleci.com/gh/IamMrCupp/esp_project/tree/master.svg?style=svg)](https://circleci.com/gh/IamMrCupp/esp_project/tree/master)
2+
DEV: [![CircleCI](https://circleci.com/gh/IamMrCupp/esp_project/tree/master.svg?style=svg)](https://circleci.com/gh/IamMrCupp/esp_project/tree/dev)
33

44

55
**Emotional Support Pizza**

0 commit comments

Comments
 (0)