fix(ci): use lowercase image prefix for OCI compliance (#49)

This commit is contained in:
Davi Rezende
2026-03-05 01:02:40 -03:00
committed by GitHub
parent f7d9aa15bd
commit 461ff067ca

View File

@@ -17,8 +17,6 @@ permissions:
env:
REGISTRY: ghcr.io
# Image name prefix: owner/repo_servicename (e.g. World-Open-Graph/br-acc_api)
IMAGE_PREFIX: ${{ github.repository_owner }}/${{ github.event.repository.name }}
jobs:
build-push:
@@ -29,6 +27,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Set image prefix (lowercase for OCI)
id: image-prefix
run: |
echo "prefix=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@@ -57,8 +60,8 @@ jobs:
file: api/Dockerfile
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}_api:${{ steps.meta.outputs.tag1 }}
${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}_api:${{ steps.meta.outputs.tag2 }}
${{ env.REGISTRY }}/${{ steps.image-prefix.outputs.prefix }}_api:${{ steps.meta.outputs.tag1 }}
${{ env.REGISTRY }}/${{ steps.image-prefix.outputs.prefix }}_api:${{ steps.meta.outputs.tag2 }}
cache-from: type=gha
cache-to: type=gha,mode=max
@@ -69,8 +72,8 @@ jobs:
file: frontend/Dockerfile
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}_frontend:${{ steps.meta.outputs.tag1 }}
${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}_frontend:${{ steps.meta.outputs.tag2 }}
${{ env.REGISTRY }}/${{ steps.image-prefix.outputs.prefix }}_frontend:${{ steps.meta.outputs.tag1 }}
${{ env.REGISTRY }}/${{ steps.image-prefix.outputs.prefix }}_frontend:${{ steps.meta.outputs.tag2 }}
cache-from: type=gha
cache-to: type=gha,mode=max
@@ -81,7 +84,7 @@ jobs:
file: etl/Dockerfile
push: true
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}_etl:${{ steps.meta.outputs.tag1 }}
${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}_etl:${{ steps.meta.outputs.tag2 }}
${{ env.REGISTRY }}/${{ steps.image-prefix.outputs.prefix }}_etl:${{ steps.meta.outputs.tag1 }}
${{ env.REGISTRY }}/${{ steps.image-prefix.outputs.prefix }}_etl:${{ steps.meta.outputs.tag2 }}
cache-from: type=gha
cache-to: type=gha,mode=max