From 26ffc6f14f3349bb718d563f46a105c7472574ca Mon Sep 17 00:00:00 2001 From: Luciano Giacchetta Date: Fri, 13 Jun 2025 11:08:32 -0300 Subject: [PATCH] #2 - Nuevo workflow builder y Makefile --- .gitea/workflows/builder.yaml | 20 ++++++++++++++++++++ .gitignore | 2 +- Makefile | 20 ++++++++++++++++++++ 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 .gitea/workflows/builder.yaml create mode 100644 Makefile diff --git a/.gitea/workflows/builder.yaml b/.gitea/workflows/builder.yaml new file mode 100644 index 0000000..f14acdd --- /dev/null +++ b/.gitea/workflows/builder.yaml @@ -0,0 +1,20 @@ +name: CodyOps Apex Builder + +on: + pull_request: + branches: + - main + +jobs: + build-conteiner: + runs-on: fedora-latest + env: + ASTRO_GTAG_COM: ${{ vars.ASTRO_GTAG_COM }} + ASTRO_GTAG_ES: ${{ vars.ASTRO_GTAG_ES }} + ASTRO_GTAG_BR: ${{ vars.ASTRO_GTAG_BR }} + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: Make Build + run: make build + \ No newline at end of file diff --git a/.gitignore b/.gitignore index 016b59e..53a7df9 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,7 @@ pnpm-debug.log* # environment variables .env -.env.production +.envrc # macOS-specific files .DS_Store diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1a548df --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +REGISTRY:= gianet.us/codyops +IMAGE:= apex +DOMAINS:= com es br + +.PHONY: init build setup $(addprefix step-,$(DOMAINS)) + +init: + direnv allow . + +setup: + npm install + +build: setup $(addprefix step-,$(DOMAINS)) + +$(addprefix step-,$(DOMAINS)): + @echo "Ejecutando step para el dominio: $(shell echo $(patsubst step-%,%,$@) | tr '[:lower:]' '[:upper:]')" + 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-%,%,$@)