Unable to use merge commit hash in the source input
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 42/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- docker, git, github-actions
- 領域
- build-system, ci-cd, devops
調査の方向性
source入力に対する bake-action v5 のソース処理と、ログに示されている BuildKit の Git ソースの動作から始めます。github.event.pull_request.merge_commit_sha を使用してワークフローを再現し、actions/checkout@v4 と比較します。マージコミットをソースとして使用でき、イメージが正常にビルドされれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Contributing guidelines
- I've read the contributing guidelines and wholeheartedly agree
I've found a bug, and:
- The documentation does not mention anything about my problem
- There are no open or closed issues that are related to my problem
Description
Unable to use merge commit hash in the source input:
- uses: docker/bake-action@v5
with:
source: ${{ github.server_url }}/${{ github.repository }}.git#${{ github.event.pull_request.merge_commit_sha }}
This is equivalent to:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
- uses: docker/bake-action@v5
docker/bake-action@v5 cannot find the merge commit, while actions/checkout@v4 can.
This bug prevents building a Docker image based on a merge commit in a pull_request_target event.
Expected behaviour
Image is successfully built based on merge commit.
Actual behaviour
docker/bake-action@v5 cannot find the merge commit, while actions/checkout@v4 can.
Parsing raw definition
/usr/bin/docker buildx bake https://github.com/vivodi/docker-flexget.git#569a8e0674b0f11330577cddb340fbc67871e4f2 --file ./docker-bake.hcl --file cwd:///tmp/docker-metadata-action-bake.json --set *.tags= --set *.platform=linux/amd64 --set *.output=type=registry,name=***/flexget,push-by-digest=true --print image
#0 building with "builder-fa364b82-62ea-463a-8441-ff9792a5355a" instance using docker-container driver
#1 [internal] load git source https://github.com/vivodi/docker-flexget.git#569a8e0674b0f11330577cddb340fbc67871e4f2
#1 0.020 Initialized empty Git repository in /var/lib/buildkit/runc-overlayfs/snapshots/snapshots/1/fs/
#1 0.024 fatal: Not a valid object name 569a8e0674b0f11330577cddb340fbc67871e4f2^{commit}
#1 0.353 From https://github.com/vivodi/docker-flexget
#1 0.353 * [new branch] dependabot/docker/python-3.13-alpine -> origin/dependabot/docker/python-3.13-alpine
#1 0.353 * [new branch] dependabot/pip/python-levenshtein-0.26.1 -> origin/dependabot/pip/python-levenshtein-0.26.1
#1 0.353 * [new branch] fix-workflow -> origin/fix-workflow
#1 0.353 * [new branch] main -> origin/main
#1 0.354 * [new branch] main2 -> origin/main2
#1 0.354 * [new branch] readme -> origin/readme
#1 0.362 fatal: unable to read tree (569a8e0674b0f11330577cddb340fbc67871e4f2)
#1 ERROR: failed to checkout remote https://github.com/vivodi/docker-flexget.git: git stderr:
fatal: unable to read tree (569a8e0674b0f11330577cddb340fbc67871e4f2)
: exit status 128
------
> [internal] load git source https://github.com/vivodi/docker-flexget.git#569a8e0674b0f11330577cddb340fbc67871e4f2:
0.020 Initialized empty Git repository in /var/lib/buildkit/runc-overlayfs/snapshots/snapshots/1/fs/
0.024 fatal: Not a valid object name 569a8e0674b0f11330577cddb340fbc67871e4f2^{commit}
0.353 From https://github.com/vivodi/docker-flexget
0.353 * [new branch] dependabot/docker/python-3.13-alpine -> origin/dependabot/docker/python-3.13-alpine
0.353 * [new branch] dependabot/pip/python-levenshtein-0.26.1 -> origin/dependabot/pip/python-levenshtein-0.26.1
0.353 * [new branch] fix-workflow -> origin/fix-workflow
0.353 * [new branch] main -> origin/main
0.354 * [new branch] main2 -> origin/main2
0.354 * [new branch] readme -> origin/readme
0.362 fatal: unable to read tree (569a8e0674b0f11330577cddb340fbc67871e4f2)
------
ERROR: failed to solve: failed to checkout remote https://github.com/vivodi/docker-flexget.git: git stderr:
fatal: unable to read tree (569a8e0674b0f11330577cddb340fbc67871e4f2)
: exit status 128
Error: cannot parse bake definitions: : exit status 128
Repository URL
No response
Workflow run URL
No response
YAML workflow
- uses: docker/bake-action@v5
with:
source: ${{ github.server_url }}/${{ github.repository }}.git#${{ github.event.pull_request.merge_commit_sha }}
Workflow logs
No response
BuildKit logs
No response
Additional info
No response
- 主要言語
- TypeScript
- スター
- 302
- フォーク
- 42
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 7
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
docker/bake-action のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
docker/bake-action#488 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
kind/enhancement status/triage
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
docker/bake-action#458 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[subaction/matrix] Generate multiple matrices when targets reference other targets as build contexts対応中かも @jeliebig が 116 日前に担当しました。 オープンkind/enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
docker/bake-action#435 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
status/triage
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
docker/bake-action#322 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
status/needs-more-info
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
docker/bake-action#312 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
docker/bake-action の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
MoonshotAI/kimi-code#4398 ·
メンテナーはふだん 1 日以内に返信
-
Xiaomi Mimo语音识别服务异常オープンpending triage
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
package-lock.json : les binaires natifs macOS et Linux de unrs-resolver ont disparu depuis #1823オープンbug dependencies
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
AxaFrance/design-system#2064 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100