Sanitize the repository name using metadata-action

https://github.com/docker/build-push-action/blob/master/TROUBLESHOOTING.md#repository-name-must-be-lowercase
This commit is contained in:
Laurent Indermuehle 2023-02-01 11:57:23 +01:00
parent f356eecce1
commit 8f6fade63f
No known key found for this signature in database
GPG key ID: 93FA944C9F34DD09

View file

@ -9,7 +9,7 @@ on:
env: env:
REGISTRY: ghcr.io REGISTRY: ghcr.io
IMAGE_NAME: community-mysql/test-container-mariadb103-py38-mysqlclient201 IMAGE_NAME: test-container-mariadb103-py38-mysqlclient201
CONTEXT: test-containers/mariadb103-py38-mysqlclient201 CONTEXT: test-containers/mariadb103-py38-mysqlclient201
jobs: jobs:
@ -39,7 +39,10 @@ jobs:
uses: docker/metadata-action@v4 uses: docker/metadata-action@v4
with: with:
images: images:
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} "${{ env.REGISTRY }}\
/${{ github.repository }}\
/${{ env.IMAGE_NAME }}"
tags: latest
# Setting up Docker Buildx with docker-container driver is required # Setting up Docker Buildx with docker-container driver is required
# at the moment to be able to use a subdirectory with Git context # at the moment to be able to use a subdirectory with Git context
@ -57,7 +60,7 @@ jobs:
with: with:
context: ${{ env.CONTEXT }} context: ${{ env.CONTEXT }}
push: true push: true
tags: ${{ steps.meta.outputs.tags }},${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha cache-from: type=gha
cache-to: type=gha,mode=max cache-to: type=gha,mode=max