Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

"nothing to commit, working tree clean Error: Invalid status code: 1" despite `skip_dirty_check`

Đang mở
#396 4 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
git, github-actions, shell
Lĩnh vực
ci-cd, devops

Hướng nghiên cứu

Tái hiện vấn đề bằng cách sử dụng .github/workflows/tag-version.yml và workflow tag-version-this-repo.yml, sau đó kiểm tra index.js xung quanh phần xử lý trạng thái ChildProcess được hiển thị trong stack trace. So sánh hành vi của v7.0.0 với v6.0.1 và issue 204; hoàn tất khi một merge rỗng, tiếp theo là skip_dirty_check, thực hiện thành công mà không có lỗi mã trạng thái không hợp lệ.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug
git-auto-commit Version

v7.0.0

Machine Type

Ubuntu (eg. ubuntu-latest)

Bug description

Despite skip_dirty_check: true, with v7.0.0 pushing an empty commit causes the following error:

nothing to commit, working tree clean
Error: Invalid status code: 1
    at ChildProcess.<anonymous> (/home/runner/work/_actions/stefanzweifel/git-auto-commit-action/28e16e81777b558cc906c8750092100bbb34c5e3/index.js:17:19)
    at ChildProcess.emit (node:events:508:28)
    at maybeClose (node:internal/child_process:1101:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5) {
  code: 1
}
Error: Invalid status code: 1
    at ChildProcess.<anonymous> (/home/runner/work/_actions/stefanzweifel/git-auto-commit-action/28e16e81777b558cc906c8750092100bbb34c5e3/index.js:17:19)
    at ChildProcess.emit (node:events:508:28)
    at maybeClose (node:internal/child_process:1101:16)
    at ChildProcess._handle.onexit (node:internal/child_process:305:5)

This is a regression with v7.0.0. With v6.0.1 this used to work. Here's a succeeding run with v6: https://github.com/Lombiq/GitHub-Actions/actions/runs/17049708039. And here's a failing one with v7: https://github.com/Lombiq/GitHub-Actions/actions/runs/18795730636/job/53635182329.

https://github.com/stefanzweifel/git-auto-commit-action/issues/204 might be related.

Steps to reproduce
  1. In your workflow, run git merge --strategy=ours --no-commit some-other-branch. This merges some-other-branch but leaving no changed files.
  2. Run the action with the below code.
  3. Observe the error mentioned above.
- uses: stefanzweifel/git-auto-commit-action@28e16e81777b558cc906c8750092100bbb34c5e3 # v7.0.0
  with:
    skip_dirty_check: true
Tried solutions

Since this is an infrequently run workflow, I just merged manually. Pushing directly with git would be an alternative.

Example Workflow
The whole workflow is here: https://github.com/Lombiq/GitHub-Actions/blob/342f3f003b75f8915c8c8311f67426971e798a52/.github/workflows/tag-version.yml (run from https://github.com/Lombiq/GitHub-Actions/blob/342f3f003b75f8915c8c8311f67426971e798a52/.github/workflows/tag-version-this-repo.yml).
Relevant log output
See above.
Repository

https://github.com/Lombiq/GitHub-Actions

Ngôn ngữ chính
Shell
Star
2.6k
Fork
284
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của stefanzweifel/git-auto-commit-action

Tất cả issue của stefanzweifel/git-auto-commit-action

Issue tương tự

Thêm issue về Shell/Bash

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.