docs.docker.jp
docs.docker.jp copied to clipboard
言語別ガイド(CI/CD 設定):リポジトリ名を小文字に変換するためのStepが必要な場合がある
リポジトリ名を小文字に変換するためのStepが必要な場合がある
Githubのユーザ名に大文字が混ざっている方の場合、
tags: ghcr.io/${{ github.repository_owner }}/simplewhale:latest
の箇所で、
buildx failed with: ERROR: invalid tag "ghcr.io/<OWNER_NAME>/simplewhale:latest": repository name must be lowercase
等のエラーが発生する可能性があります。
したがって、たとえば以下のようなStepが必要かもしれない。という但し書きを追加することを提案します。
# lowercase
- name: set lower case owner name
run: |
echo "OWNER_LC=${OWNER,,}" >>${GITHUB_ENV}
env:
OWNER: '${{ github.repository_owner }}'
# 修正
tags: ghcr.io/${{ env.OWNER_LC }}/simplewhale:latest