-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile
29 lines (26 loc) · 647 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
IMAGE_NAME=github-actions-automate-projects
DOCKER_REPO=takanabe/github-actions-automate-projects
TAG_NAME=sandbox
#
# Build Dockerfile and push the image to DockerHub
#
.PHONY: all
all: docker-build docker-tag docker-publish
#
# Build Docker image
#
.PHONY: docker-build
docker-build:
docker build --no-cache -f Dockerfile.build . -t $(IMAGE_NAME):$(TAG_NAME)
#
# Build Docker image with DockerHub repository
#
.PHONY: docker-tag
docker-tag:
docker image tag $(IMAGE_NAME):$(TAG_NAME) $(DOCKER_REPO):$(TAG_NAME)
#
# Publish Docker image and tags on DockerHub
#
.PHONY: docker-publish
docker-publish:
docker push $(DOCKER_REPO):$(TAG_NAME)