fix: remove duplicate :preprod tag and align cache image names
Some checks failed
CI/CD Pipeline / Integration Tests (push) Blocked by required conditions
CI/CD Pipeline / Deployment Summary (push) Blocked by required conditions
CI/CD Pipeline / Frontend - Build, Test & Push (push) Failing after 6m46s
CI/CD Pipeline / Backend - Build, Test & Push (push) Has been cancelled

Fixed invalid Docker tag errors caused by:
1. Duplicate :preprod suffix in image names (xpeditis-backend:preprod:preprod)
2. Mismatched cache image names (backend vs xpeditis-backend)

Changes:
- Backend: images: xpeditis-backend (removed :preprod suffix)
- Frontend: images: xpeditis-frontend (removed :preprod suffix)
- Backend cache: backend:buildcache → xpeditis-backend:buildcache
- Frontend cache: frontend:buildcache → xpeditis-frontend:buildcache

docker/metadata-action automatically adds branch-based tags, so we should
never add :preprod to the base image name.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
David 2025-11-17 12:23:00 +01:00
parent 3d871f9813
commit f25dbd7ab9

View File

@ -55,7 +55,7 @@ jobs:
id: meta id: meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
with: with:
images: ${{ env.REGISTRY }}/xpeditis-backend:preprod images: ${{ env.REGISTRY }}/xpeditis-backend
tags: | tags: |
type=ref,event=branch type=ref,event=branch
type=ref,event=pr type=ref,event=pr
@ -72,8 +72,8 @@ 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 }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/backend:buildcache cache-from: type=registry,ref=${{ env.REGISTRY }}/xpeditis-backend:buildcache
cache-to: type=registry,ref=${{ env.REGISTRY }}/backend:buildcache,mode=max cache-to: type=registry,ref=${{ env.REGISTRY }}/xpeditis-backend:buildcache,mode=max
platforms: linux/amd64 platforms: linux/amd64
# ============================================ # ============================================
@ -127,7 +127,7 @@ jobs:
id: meta id: meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
with: with:
images: ${{ env.REGISTRY }}/xpeditis-frontend:preprod images: ${{ env.REGISTRY }}/xpeditis-frontend
tags: | tags: |
type=ref,event=branch type=ref,event=branch
type=ref,event=pr type=ref,event=pr
@ -144,8 +144,8 @@ 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 }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/frontend:buildcache cache-from: type=registry,ref=${{ env.REGISTRY }}/xpeditis-frontend:buildcache
cache-to: type=registry,ref=${{ env.REGISTRY }}/frontend:buildcache,mode=max cache-to: type=registry,ref=${{ env.REGISTRY }}/xpeditis-frontend:buildcache,mode=max
platforms: linux/amd64 platforms: linux/amd64
build-args: | build-args: |
NEXT_PUBLIC_API_URL=${{ secrets.NEXT_PUBLIC_API_URL || 'http://localhost:4000' }} NEXT_PUBLIC_API_URL=${{ secrets.NEXT_PUBLIC_API_URL || 'http://localhost:4000' }}