diff --git a/Makefile b/Makefile index a1d8c71..1c23aea 100644 --- a/Makefile +++ b/Makefile @@ -47,6 +47,9 @@ ifndef GITHUB_PAT endif ifndef GITHUB_USERNAME $(error GITHUB_USERNAME env var is not set) +endif +ifneq "$(shell git branch --show-current)" "master" + $(error This command can only be run on the master branch) endif echo $$GITHUB_PAT | docker login ghcr.io --username $$GITHUB_USERNAME --password-stdin VERSION=$(VERSION) $(COMPOSE_PUBLISH) build