Add dynamic dependency args to dockerfile

Add makefile for automating build and push commands
This commit is contained in:
2024-02-28 13:29:20 -05:00
parent 2cc57c32b7
commit 173dc2d719
2 changed files with 22 additions and 2 deletions

17
Makefile Normal file
View File

@@ -0,0 +1,17 @@
REPOSITORY = vcs.enp.one/skylab/semaphore-runner
OPENTOFU_VERSION = 1.6.2
SEMAPHORE_VERSION = 2.9.45
.PHONY: help docs
# source: https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
help: ## List Makefile targets
$(info Makefile documentation)
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-10s\033[0m %s\n", $$1, $$2}'
image: ## Build image
podman build . --tag $(REPOSITORY):$(SEMAPHORE_VERSION) --build-arg "OPENTOFU_VERSION=$(OPENTOFU_VERSION)" --build-arg "SEMAPHORE_VERSION=$(SEMAPHORE_VERSION)"
push: image ## Build and publish image
podman push $(REPOSITORY):$(SEMAPHORE_VERSION)