Skip to content

Commit

Permalink
forced lowercase for repo name
Browse files Browse the repository at this point in the history
  • Loading branch information
jordan-dalby committed Oct 23, 2024
1 parent 1131cab commit 5322772
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
IMAGE_NAME: ${{ toLowerCase(github.repository) }}

jobs:
docker:
Expand All @@ -20,6 +20,11 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Convert repository name to lowercase
id: repo-name
run: |
echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

Expand All @@ -37,7 +42,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: ${{ env.REGISTRY }}/${{ env.REPO_LOWERCASE }}
tags: |
type=semver,pattern={{version}}
type=raw,value=latest,enable={{is_default_branch}}
Expand All @@ -50,5 +55,5 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache,mode=max
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.REPO_LOWERCASE }}:buildcache
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.REPO_LOWERCASE }}:buildcache,mode=max

0 comments on commit 5322772

Please sign in to comment.