Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Invalid tag/reference format with ghcr.io

オープン
#77 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
docker, github-actions
領域
ci-cd, devops

調査の方向性

まず、cloudposse/[email protected] を使って示されているワークフローを再現し、その inputs と生成された buildx コマンドを比較します。registry、organization、repository の値がどのようにイメージタグになるかを追跡します。完了条件は、ワークフローが空のパスを含まない有効な ghcr.io タグを生成することです。

索引モデルが issue の本文から書いたものです。

説明

bug

Found a bug? Maybe our Slack Community can help.

Slack Community

Describe the Bug

Hello,
I'm trying to set up a Github Workflow that uses this action to create and publish a docker image to ghcr.io.
I'm getting an error on the Builder info step

Error: buildx failed with: ERROR: invalid tag "ghcr.io//:sha-8cc8e90c5ebb6ff27df767484b7f95f9d70f3faa": invalid reference format

Expected Behavior

I expect the default tags to work.

Steps to Reproduce

Whenever a workflow action runs, see below.

Screenshots

See below

Environment (please complete the following information):

My (simplified) workflow config

name: Release
on:
  push:
    branches:
      - main
  release:
    type: [published]
permissions:
  contents: read
  packages: write
jobs:
  build-and-push-image:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Build and push
        uses: cloudposse/[email protected]
        with:
          registry: ghcr.io
          login: ${{ github.actor }}
          password: ${{ secrets.github_token }}
          organization: ${{ github.repository.owner.login }}
          repository: ${{ github.repository.name }}

Additional Context

Error output

/usr/bin/docker buildx build --cache-from type=gha --cache-to type=gha,mode=max --file .//Dockerfile --iidfile /home/runner/work/_temp/docker-actions-toolkit-SPmw6I/build-iidfile-1c3c362c17.txt --label org.opencontainers.image.created=2025-01-14T13:35:44.838Z --label org.opencontainers.image.description=Project description --label org.opencontainers.image.licenses= --label org.opencontainers.image.revision=8baa8e2249f3a8b6e427ef8eecd0847f660d4099 --label org.opencontainers.image.source=https://github.com// --label org.opencontainers.image.title=my-project --label org.opencontainers.image.url=https://github.com/my-org/my-project --label org.opencontainers.image.version=sha-8baa8e2249f3a8b6e427ef8eecd0847f660d4099 --platform linux/amd64 --attest type=provenance,mode=min,inline-only=true,builder-id=https://github.com/my-org/my-project/actions/runs/12768807147 --tag ghcr.io//:sha-8baa8e2249f3a8b6e427ef8eecd0847f660d4099 --tag ghcr.io//:main --tag ghcr.io//:latest --tag ghcr.io//:sha-8baa8e2 --metadata-file /home/runner/work/_temp/docker-actions-toolkit-SPmw6I/build-metadata-e623a3464d.json --pull --push ./
ERROR: invalid tag "ghcr.io//:sha-8baa8e2249f3a8b6e427ef8eecd0847f660d4099": invalid reference format
Error: buildx failed with: ERROR: invalid tag "ghcr.io//:sha-8baa8e2249f3a8b6e427ef8eecd0847f660d4099": invalid reference format
主要言語
Dockerfile
スター
14
フォーク
15
平均マージ
8時間 45分
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

cloudposse/github-action-docker-build-push のほかの issue

cloudposse/github-action-docker-build-push の issue をすべて見る

似ている issue

DevOps の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。