Fix #6 - Agregar despliege workflow y makefile (#7)

Reviewed-on: #7
Co-authored-by: Luciano Giacchetta <giacchetta-@outlook.com>
Co-committed-by: Luciano Giacchetta <giacchetta-@outlook.com>
This commit is contained in:
Luciano Giacchetta 2025-06-13 15:56:45 -03:00 committed by Luciano Giacchetta
parent f57e758909
commit 1c2c71cfc4
2 changed files with 11 additions and 3 deletions

View File

@ -17,4 +17,6 @@ jobs:
uses: actions/checkout@v4
- name: Make Build
run: make build
- name: Make Deploy
run: make deploy

View File

@ -1,8 +1,9 @@
REGISTRY:= gianet.us/codyops
NAMESPACE:= codyops
REGISTRY:= gianet.us/$(NAMESPACE)
IMAGE:= apex
DOMAINS:= com es br
.PHONY: init build setup $(addprefix step-,$(DOMAINS))
.PHONY: init build setup $(addprefix step-,$(DOMAINS)) $(addprefix deploy-,$(DOMAINS))
init:
direnv allow .
@ -17,4 +18,9 @@ $(addprefix step-,$(DOMAINS)):
export ASTRO_GTAG=${ASTRO_GTAG_$(shell echo $(patsubst step-%,%,$@) | tr '[:lower:]' '[:upper:]')} && \
npx astro build --force
podman build --pull=newer --tag $(REGISTRY)/$(IMAGE):$(patsubst step-%,%,$@) .
#podman push $(REGISTRY)/$(IMAGE):$(patsubst step-%,%,$@)
podman push $(REGISTRY)/$(IMAGE):$(patsubst step-%,%,$@)
deploy: $(addprefix deploy-,$(DOMAINS))
$(addprefix deploy-,$(DOMAINS)):
kubectl -n $(NAMESPACE) rollout restart deployment/$(NAMESPACE)-$(IMAGE)-$(shell echo $(patsubst deploy-%,%,$@))