Fix #2 - Nuevo workflow builder y Makefile (#4)

Reviewed-on: #4
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 11:10:02 -03:00 committed by Luciano Giacchetta
parent 6a535cfc85
commit f57e758909
3 changed files with 41 additions and 1 deletions

View File

@ -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

2
.gitignore vendored
View File

@ -15,7 +15,7 @@ pnpm-debug.log*
# environment variables
.env
.env.production
.envrc
# macOS-specific files
.DS_Store

20
Makefile Normal file
View File

@ -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-%,%,$@)