ci: images registry en minuscules + compose override registry
Some checks are pending
publish-images / docker-build-and-push (push) Waiting to run

This commit is contained in:
Nicolas Cantu 2025-09-11 16:56:06 +02:00
parent f50481cc38
commit 7d17215727
2 changed files with 24 additions and 9 deletions

View File

@ -2,17 +2,17 @@ name: publish-images
on:
push:
branches: [ dev, main ]
tags: [ 'v*' ]
branches: [ '**' ]
tags: [ '*' ]
env:
REGISTRY: git.4nkweb.com
IMAGE_OWNER: 4nk
IMAGE_REPO: 4NK_IA_back
IMAGE_REPO: 4nk-ia-back
jobs:
docker-build-and-push:
runs-on: ubuntu-latest
runs-on: debian-runner
steps:
- name: Checkout
uses: actions/checkout@v4
@ -33,13 +33,20 @@ jobs:
- name: Compute tags
id: meta
run: |
if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
VERSION_TAG="${GITHUB_REF_NAME}"
set -euo pipefail
# Déterminer si l'on est sur un tag exact
if TAG_NAME=$(git describe --tags --exact-match 2>/dev/null); then
VERSION_TAG="$TAG_NAME"
else
SHORT_SHA=$(echo "${GITHUB_SHA}" | cut -c1-8)
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
if [[ "$BRANCH_NAME" == "HEAD" ]]; then
SHORT_SHA=$(git rev-parse --short=8 HEAD)
VERSION_TAG="sha-${SHORT_SHA}"
else
VERSION_TAG=$(echo "$BRANCH_NAME" | tr '/' '-')
fi
echo "version=${VERSION_TAG}" >> $GITHUB_OUTPUT
fi
echo "version=${VERSION_TAG}" >> "$GITHUB_OUTPUT"
- name: Build & Push host-api
uses: docker/build-push-action@v6

View File

@ -0,0 +1,8 @@
services:
host-api:
image: git.4nkweb.com/4nk/4nk-ia-back/host-api:${IMAGE_TAG:-dev}
worker:
image: git.4nkweb.com/4nk/4nk-ia-back/worker:${IMAGE_TAG:-dev}