InnerSourceCommons / InnerSourceCommons/InnerSourcePatterns
Unexpected failure in GitHub Action run
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- HTML
- Star
- 853
- Fork
- 206
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 2
Mô tả
In a recent pull request (https://github.com/InnerSourceCommons/InnerSourcePatterns/pull/579), one of our GitHub Action (GHA) workflow runs failed.
Overview of failed GHAs:
Now when looking at the details of that workflow run, I noticed something interesting:
- when you click on "workflow file", it takes you to the
book.ymlfile from this branch/PR (which comes from a fork) - however the file that really got executed is actually the one on the
mainbranch of the upstream. I am so sure about this as the main branch contains the config for a matrix build for this GHA, while the branch from the PR does not have that matrix build yet)
So at the very least I am starting to wonder how GHAs really work. Seems like I might have some misunderstandings here.
My questions are:
- which GHAs are executed? the ones on the
mainbranch, or the ones on the PR branch, or both? mainand PR contain different versions of the same GHA. what happens in that case?
And lastly:
Why does this GHA run fail at all?
It seems like it is looking for a git ref hive-mind-pattern-1 and cannot find it? Possibly because that ref only exists on the fork but not on the upstream?
Do we have to configure the actions/checkout differently, so that it can find that git ref?
Right now we use ref: ${{ github.head_ref }}, which is defined as:
The head_ref or source branch of the pull request in a workflow run. This property is only available when the event that triggers a workflow run is either pull_request or pull_request_target.
I am suspecting that we are checking out the upstream repo InnerSourceCommons/InnerSourcePatterns but then trying to point to a ref that does not exist on that upsream.
Just not sure how one would configure this correctly?
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.
Hướng nghiên cứu
Bắt đầu với .github/workflows/book.yml trên main và phiên bản trong pull request #579, sau đó kiểm tra lần chạy workflow 6003953262 và bước actions/checkout sử dụng github.head_ref. So sánh ngữ cảnh sự kiện, repository đã được checkout và các refs hiện có để giải thích lỗi. Công việc được xem là hoàn tất khi đã ghi lại phiên bản workflow và ref được sử dụng, đồng thời xác định cấu hình cần thiết để workflow của PR chạy thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- git, github-actions
- Lĩnh vực
- ci-cd, devops
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100