[PR #46] [MERGED] Handle docker image build failures #1338

Closed
opened 2026-03-01 21:50:46 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/46
Author: @sosedoff
Created: 3/2/2019
Status: Merged
Merged: 3/2/2019
Merged by: @cplee

Base: masterHead: capture-build-error


📝 Commits (2)

  • 5330599 Capture errors from docker log output
  • 1c25ee9 Add an extra test

📊 Changes

6 files changed (+45 additions, -19 deletions)

View changed files

📝 Makefile (+3 -0)
📝 actions/runner_test.go (+2 -1)
actions/testdata/buildfail-action/Dockerfile (+2 -0)
actions/testdata/buildfail.workflow (+8 -0)
📝 container/docker_build.go (+2 -1)
📝 container/docker_common.go (+28 -17)

📄 Description

This is related to #33 and #42.

I initially thought that after i updated to latest act version my issue went away. Just confirmed that
that's not the case, and i was able to reproduce the error locally.

When running act without -v flag and when the action's docker image fails to build, users see a cryptic message "docker image ... not found". The run should have been aborted but it's not, this has to do with the build process error handling. I added a conditional to logDockerResponse function to catch error message details if it's present.

So now users will actually see the reason why the docker image build had failed. This change also fixed the issue when act runs the older docker image if the most recent one has failed to build.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/nektos/act/pull/46 **Author:** [@sosedoff](https://github.com/sosedoff) **Created:** 3/2/2019 **Status:** ✅ Merged **Merged:** 3/2/2019 **Merged by:** [@cplee](https://github.com/cplee) **Base:** `master` ← **Head:** `capture-build-error` --- ### 📝 Commits (2) - [`5330599`](https://github.com/nektos/act/commit/5330599c93470f755a5e034c14639f7626ccde95) Capture errors from docker log output - [`1c25ee9`](https://github.com/nektos/act/commit/1c25ee9d710c1c011185093112e33eaba00d6368) Add an extra test ### 📊 Changes **6 files changed** (+45 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `Makefile` (+3 -0) 📝 `actions/runner_test.go` (+2 -1) ➕ `actions/testdata/buildfail-action/Dockerfile` (+2 -0) ➕ `actions/testdata/buildfail.workflow` (+8 -0) 📝 `container/docker_build.go` (+2 -1) 📝 `container/docker_common.go` (+28 -17) </details> ### 📄 Description This is related to #33 and #42. I initially thought that after i updated to latest `act` version my issue went away. Just confirmed that that's not the case, and i was able to reproduce the error locally. When running act without `-v` flag and when the action's docker image fails to build, users see a cryptic message "docker image ... not found". The run should have been aborted but it's not, this has to do with the build process error handling. I added a conditional to `logDockerResponse` function to catch error message details if it's present. So now users will actually see the reason why the docker image build had failed. This change also fixed the issue when `act` runs the older docker image if the most recent one has failed to build. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 21:50:46 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#1338
No description provided.