Skip to content

Commit 4c5b3c8

Browse files
authored
Downsize the org:repo name (#1104)
Currently we fail with: `ERROR: invalid tag "ghcr.io/PyCQA/bandit/bandit:latest": repository name must be lowercase` This is from the capitalized org name: PyCQA This change lowercases the entire string
1 parent 3f86e84 commit 4c5b3c8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/build-publish-image.yml

+6-2
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,23 @@ jobs:
4545
with:
4646
cosign-release: 'v2.2.2'
4747

48+
- name: Downcase github.repository value
49+
run: |
50+
echo "IMAGE_NAME=`echo ${{github.repository}} | tr '[:upper:]' '[:lower:]'`" >>${GITHUB_ENV}
51+
4852
- name: Build and push Docker image
4953
id: build-and-push
5054
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5
5155
with:
5256
context: .
5357
file: ./docker/Dockerfile
5458
push: true
55-
tags: ghcr.io/${{ github.repository }}/bandit:latest
59+
tags: ghcr.io/${{ env.IMAGE_NAME }}/bandit:latest
5660
platforms: linux/amd64, linux/arm64, linux/arm/v7, linux/arm/v8
5761

5862
- name: Sign the image
5963
env:
60-
TAGS: ghcr.io/${{ github.repository }}/bandit:latest
64+
TAGS: ghcr.io/${{ env.IMAGE_NAME }}/bandit:latest
6165
DIGEST: ${{ steps.build-and-push.outputs.digest }}
6266
run: |
6367
echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}

0 commit comments

Comments
 (0)