mirror of
https://github.com/kharonsec/br-acc
synced 2026-04-25 17:15:02 +02:00
fix(ci): use lowercase image prefix for OCI compliance (#49)
This commit is contained in:
19
.github/workflows/docker-ci.yml
vendored
19
.github/workflows/docker-ci.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user