Skip to content

Commit f35fc9e

Browse files
committed
Added make build_ghcr_image_current_branch
1 parent cc28d8d commit f35fc9e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

makefiles/release.mk

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,11 @@ release_build_local: ## Build binary for current platform only
160160
@mkdir -p $(RELEASE_DIR)
161161
@CGO_ENABLED=0 go build -ldflags="$(LDFLAGS)" -o $(RELEASE_DIR)/path-local ./cmd
162162
@echo "✓ Built $(RELEASE_DIR)/path-local"
163+
164+
.PHONY: build_ghcr_image_current_branch
165+
build_ghcr_image_current_branch: ## Trigger the main-build workflow using the current branch to push an image to ghcr.io/buildwithgrove/path
166+
@echo "Triggering main-build workflow for current branch..."
167+
@BRANCH=$$(git rev-parse --abbrev-ref HEAD) && \
168+
gh workflow run main-build.yml --ref $$BRANCH
169+
@echo "Workflow triggered for branch: $$(git rev-parse --abbrev-ref HEAD)"
170+
@echo "Check the workflow status at: https://github.com/$(shell git config --get remote.origin.url | sed 's/.*github.com[:/]\([^/]*\/[^.]*\).*/\1/')/actions/workflows/main-build.yml"

0 commit comments

Comments
 (0)