Unable to use merge commit hash in the source input
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 42/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- docker, git, github-actions
- Lĩnh vực
- build-system, ci-cd, devops
Hướng nghiên cứu
Bắt đầu với việc xử lý source của bake-action v5 cho đầu vào source và hành vi Git source của BuildKit được thể hiện trong các log. Tái hiện workflow bằng github.event.pull_request.merge_commit_sha và so sánh với actions/checkout@v4; hoàn thành khi có thể sử dụng một merge commit làm source và image được build thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- TypeScript
- Star
- 302
- Fork
- 42
- Merge trung bình
- 1 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 7
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của docker/bake-action
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
docker/bake-action#488 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add support for dockerignoreĐang mởkind/enhancement status/triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
docker/bake-action#458 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[subaction/matrix] Generate multiple matrices when targets reference other targets as build contextsCó thể đã có người làm @jeliebig đã nhận 115 ngày trước. Đang mởkind/enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
docker/bake-action#435 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
status/triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
docker/bake-action#322 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
status/needs-more-info
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
docker/bake-action#312 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của docker/bake-action
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
awesome-dsh-plugin/awesome-dsh-plugin#9184 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
farion1231/cc-switch#8829 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[core-client] Remove unused hand-maintained transport helpers after the definition-table cutoverĐang mởdoc-audit enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100