diff --git a/.github/workflows/build-trigger.yml b/.github/workflows/build-trigger.yml index 38f358151..fbc86f20e 100644 --- a/.github/workflows/build-trigger.yml +++ b/.github/workflows/build-trigger.yml @@ -12,6 +12,8 @@ on: - 'internal/**' - 'Makefile' - 'VERSION' + - 'go.mod' + - 'go.sum' workflow_dispatch: concurrency: diff --git a/Makefile b/Makefile index afe535844..9a8d0b2cb 100644 --- a/Makefile +++ b/Makefile @@ -94,6 +94,10 @@ LINT_CNTR_CMD ?= golangci-lint run -v --timeout=5m #? DOCS_CNTR_IMG The mkdocs image to use (default: harbor.nbfc.io/nubificus/urunc/mkdocs:test) DOCS_CNTR_IMG ?= harbor.nbfc.io/nubificus/urunc/mkdocs:latest +#? URUNC_DEPLOY_IMG Name and tag of the urunc-deploy image (default: urunc-deploy:latest) +URUNC_DEPLOY_IMG ?= urunc-deploy:latest +URUNC_DEPLOY_DOCKERFILE := $(CURDIR)/deployment/urunc-deploy/Dockerfile + # Install dependencies variables # # If we have already built either static or dynamic version of urunc @@ -232,6 +236,19 @@ docs: docs_container: $(CNTR_TOOL) $(CNTR_OPTS) -p 8000:8000 -v $${PWD}:/docs $(DOCS_CNTR_IMG) +# Deployment targets +# +# The urunc-deploy image must be built from the repository root and needs +# COMMIT as a build-arg, otherwise the embedded version has no commit. +## urunc_deploy Build the urunc-deploy container image for host arch. +.PHONY: urunc_deploy +urunc_deploy: + $(CNTR_TOOL) build \ + --build-arg COMMIT=$(COMMIT) \ + -f $(URUNC_DEPLOY_DOCKERFILE) \ + -t $(URUNC_DEPLOY_IMG) \ + $(CURDIR) + # Testing targets ## test Run all tests .PHONY: test