fix: fixed config gathering in ci.yml
This commit is contained in:
@@ -37,9 +37,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Load config from Makefile
|
- name: Load config from Makefile
|
||||||
id: config
|
id: config
|
||||||
run: |
|
run: make -s _ci-dump-config >> $GITHUB_OUTPUT
|
||||||
eval "$(make -s _ci-image-name)"
|
|
||||||
echo "image_name=${IMAGE_NAME}" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: 🏷️ Docker Metadata (Tags & Labels)
|
- name: 🏷️ Docker Metadata (Tags & Labels)
|
||||||
id: meta
|
id: meta
|
||||||
@@ -48,9 +46,9 @@ jobs:
|
|||||||
images: gitea.iswearihadsomethingforthis.net/francwa/${{ steps.config.outputs.image_name }}
|
images: gitea.iswearihadsomethingforthis.net/francwa/${{ steps.config.outputs.image_name }}
|
||||||
tags: |
|
tags: |
|
||||||
# Case 1 - Git Tag (v1.2.3)
|
# Case 1 - Git Tag (v1.2.3)
|
||||||
type=semver,pattern={{version}}
|
type=semver,pattern={{ version }}
|
||||||
# Case 2 - Push on main
|
# Case 2 - Push on main
|
||||||
type=raw,value=latest,enable={{is_default_branch}}
|
type=raw,value=latest,enable={{ is_default_branch }}
|
||||||
# Both case - Commit sha
|
# Both case - Commit sha
|
||||||
type=sha
|
type=sha
|
||||||
|
|
||||||
@@ -69,3 +67,7 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
build-args: |
|
||||||
|
PYTHON_VERSION=${{ steps.config.outputs.python_version }}
|
||||||
|
PYTHON_VERSION_SHORT=${{ steps.config.outputs.python_version_short }}
|
||||||
|
RUNNER=${{ steps.config.outputs.runner }}
|
||||||
|
|||||||
20
Makefile
20
Makefile
@@ -3,20 +3,18 @@
|
|||||||
.DEFAULT_GOAL := help
|
.DEFAULT_GOAL := help
|
||||||
|
|
||||||
# --- SETTINGS ---
|
# --- SETTINGS ---
|
||||||
|
CORE_DIR = brain
|
||||||
|
IMAGE_NAME = agent_media
|
||||||
PYTHON_VERSION = 3.12.7
|
PYTHON_VERSION = 3.12.7
|
||||||
PYTHON_VERSION_SHORT = $(shell echo $(PYTHON_VERSION) | cut -d. -f1,2)
|
PYTHON_VERSION_SHORT = $(shell echo $(PYTHON_VERSION) | cut -d. -f1,2)
|
||||||
# Change to 'uv' when ready.
|
# Change to 'uv' when ready.
|
||||||
RUNNER ?= poetry
|
RUNNER ?= poetry
|
||||||
|
SERVICE_NAME = agent_media
|
||||||
|
|
||||||
|
export IMAGE_NAME
|
||||||
export PYTHON_VERSION
|
export PYTHON_VERSION
|
||||||
export PYTHON_VERSION_SHORT
|
export PYTHON_VERSION_SHORT
|
||||||
export RUNNER
|
export RUNNER
|
||||||
export IMAGE_NAME
|
|
||||||
|
|
||||||
# --- VARIABLES ---
|
|
||||||
CORE_DIR = brain
|
|
||||||
SERVICE_NAME = agent_media
|
|
||||||
IMAGE_NAME = agent_media
|
|
||||||
|
|
||||||
# --- ADAPTERS ---
|
# --- ADAPTERS ---
|
||||||
# UV uses "sync", Poetry uses "install". Both install DEV deps by default.
|
# UV uses "sync", Poetry uses "install". Both install DEV deps by default.
|
||||||
@@ -46,7 +44,7 @@ T = \033[36m
|
|||||||
R = \033[0m
|
R = \033[0m
|
||||||
|
|
||||||
# --- TARGETS ---
|
# --- TARGETS ---
|
||||||
.PHONY: add build build-test check-docker check-runner clean coverage down format help init-dotenv install install-hooks lint logs major minor patch prune ps restart run shell test up update _check_branch _ci-image-name _ci-run-tests _push_tag
|
.PHONY: add build build-test check-docker check-runner clean coverage down format help init-dotenv install install-hooks lint logs major minor patch prune ps restart run shell test up update _check_branch _ci-dump-config _ci-run-tests _push_tag
|
||||||
|
|
||||||
# Catch-all for args
|
# Catch-all for args
|
||||||
%:
|
%:
|
||||||
@@ -240,8 +238,12 @@ _check_branch:
|
|||||||
echo "❌ Error: not on the main branch"; exit 1; \
|
echo "❌ Error: not on the main branch"; exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
_ci-image-name:
|
_ci-dump-config:
|
||||||
@echo "IMAGE_NAME=$(IMAGE_NAME)"
|
@echo "image_name=$(IMAGE_NAME)"
|
||||||
|
@echo "python_version=$(PYTHON_VERSION)"
|
||||||
|
@echo "python_version_short=$(PYTHON_VERSION_SHORT)"
|
||||||
|
@echo "runner=$(IMAGE_NAME)"
|
||||||
|
@echo "service_name=$(SERVICE_NAME)"
|
||||||
|
|
||||||
_ci-run-tests: build-test
|
_ci-run-tests: build-test
|
||||||
@echo "$(T)🧪 Running tests in Docker...$(R)"
|
@echo "$(T)🧪 Running tests in Docker...$(R)"
|
||||||
|
|||||||
Reference in New Issue
Block a user