Skip to content

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

@Toraneko0101

Description

@Toraneko0101

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions