From 5410ebb15505f6556a2c6f510a7717c3e678c691 Mon Sep 17 00:00:00 2001 From: Jason Antman Date: Sat, 13 Jun 2026 07:34:49 -0400 Subject: [PATCH] Lowercase GHCR image repository name in docker builds The DecaturMakers org name contains an uppercase letter, but Docker/GHCR repository names must be lowercase. Building tags directly from ${{ github.repository }} produced an invalid tag (ghcr.io/DecaturMakers/machine-access-control:...) and failed the build. Add a step that lowercases $GITHUB_REPOSITORY via bash parameter expansion and reference its output in the image tags, in both the tests.yml docker job and the release.yml publish job. The OCI image labels (URLs) are left as-is since GitHub URLs are case-insensitive. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/release.yml | 7 +++++-- .github/workflows/tests.yml | 5 ++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 52c2e9f..2e210ed 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -33,6 +33,9 @@ jobs: uses: docker/setup-buildx-action@v4 - name: Login to GHCR run: echo "${{secrets.GITHUB_TOKEN}}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin + - name: Lowercase image repository name + id: image + run: echo "repo=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT" - name: Docker Build and Push uses: docker/build-push-action@v7 with: @@ -44,8 +47,8 @@ jobs: org.opencontainers.image.version=${{ github.ref_name }} org.opencontainers.image.revision=${{ github.sha }} tags: | - ghcr.io/${{ github.repository }}:${{ github.ref_name }} - ghcr.io/${{ github.repository }}:latest + ghcr.io/${{ steps.image.outputs.repo }}:${{ github.ref_name }} + ghcr.io/${{ steps.image.outputs.repo }}:latest - name: Build and publish to pypi uses: JRubics/poetry-publish@v2.1 with: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 693901b..b33d8db 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -127,6 +127,9 @@ jobs: uses: docker/setup-buildx-action@v4 - name: Login to GHCR run: echo "${{secrets.GITHUB_TOKEN}}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin + - name: Lowercase image repository name + id: image + run: echo "repo=${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT" - name: Docker Build uses: docker/build-push-action@v7 with: @@ -140,4 +143,4 @@ jobs: org.opencontainers.image.version=${{ github.ref_name }} org.opencontainers.image.revision=${{ github.sha }} tags: | - ghcr.io/${{ github.repository }}:${{ github.sha }} + ghcr.io/${{ steps.image.outputs.repo }}:${{ github.sha }}