Skip to content

Commit 0f5cb4b

Browse files
author
w7years
committed
🐛 fix(Makefile): use lowercase GitHub username for Docker image tags and pushes
1 parent a56de28 commit 0f5cb4b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Makefile

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
PROJECT_NAME := ai-api-proxy
66
VERSION ?= v0.0.1
77
GITHUB_USERNAME ?= wangweix
8+
GITHUB_USERNAME_LOWER := $(shell echo $(GITHUB_USERNAME) | tr '[:upper:]' '[:lower:]')
89

910
BASE_PATH := $(shell pwd)
1011
BUILD_PATH := $(BASE_PATH)/build
@@ -74,14 +75,14 @@ run: build
7475
docker:
7576
@echo "Build Docker image..."
7677
@docker build . --file Dockerfile \
77-
--tag ghcr.io/$(GITHUB_USERNAME)/$(PROJECT_NAME):latest \
78-
--tag ghcr.io/$(GITHUB_USERNAME)/$(PROJECT_NAME):$(VERSION)
78+
--tag ghcr.io/$(GITHUB_USERNAME_LOWER)/$(PROJECT_NAME):latest \
79+
--tag ghcr.io/$(GITHUB_USERNAME_LOWER)/$(PROJECT_NAME):$(VERSION)
7980

8081
# Push Docker image to registry
8182
docker-push: docker
8283
@echo "Push Docker image to GitHub Container Registry..."
83-
@docker push ghcr.io/$(GITHUB_USERNAME)/$(PROJECT_NAME):latest
84-
@docker push ghcr.io/$(GITHUB_USERNAME)/$(PROJECT_NAME):$(VERSION)
84+
@docker push ghcr.io/$(GITHUB_USERNAME_LOWER)/$(PROJECT_NAME):latest
85+
@docker push ghcr.io/$(GITHUB_USERNAME_LOWER)/$(PROJECT_NAME):$(VERSION)
8586

8687
# Display help information
8788
help:

0 commit comments

Comments
 (0)