docs.docker.jp icon indicating copy to clipboard operation
docs.docker.jp copied to clipboard

言語別ガイド(CI/CD 設定):リポジトリ名を小文字に変換するためのStepが必要な場合がある

Open Toraneko0101 opened this issue 1 year ago • 0 comments

リポジトリ名を小文字に変換するための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

Toraneko0101 avatar Oct 17 '23 05:10 Toraneko0101