[PR #1596] [MERGED] Docker build fixes #2021

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

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/1596
Author: @aidandj
Created: 2/1/2023
Status: Merged
Merged: 2/3/2023
Merged by: @mergify[bot]

Base: masterHead: aidan/relative-dockerfile


📝 Commits (2)

  • 9c5f028 Docker build fixes
  • 262b082 Merge branch 'master' into aidan/relative-dockerfile

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 pkg/runner/action.go (+1 -1)

📄 Description

I had some issues building local action containers, and when the dockerfile path had a relative path.

  • Don't pull if building locally
    • I found that pull was failing because an image would get built but not pushed locally. So if building an image, I set pull to false
  • Join relative path and split dockerfile off to get context
    • With relative paths to dockerfiles the context wasn't getting created correctly. So instead join the context dir and the dockerfile path and split off the dockerfile to build the context

I could use some advice on testing. It looked like there weren't many docker action tests.

Signed-off-by: Aidan Jensen aidan@artificial.com


🔄 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/1596 **Author:** [@aidandj](https://github.com/aidandj) **Created:** 2/1/2023 **Status:** ✅ Merged **Merged:** 2/3/2023 **Merged by:** [@mergify[bot]](https://github.com/apps/mergify) **Base:** `master` ← **Head:** `aidan/relative-dockerfile` --- ### 📝 Commits (2) - [`9c5f028`](https://github.com/nektos/act/commit/9c5f028e21e315d8cffff40a5a04470f7ecb9629) Docker build fixes - [`262b082`](https://github.com/nektos/act/commit/262b082a8e173c4b272e5637a9604914abe9fefc) Merge branch 'master' into aidan/relative-dockerfile ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `pkg/runner/action.go` (+1 -1) </details> ### 📄 Description I had some issues building local action containers, and when the dockerfile path had a relative path. - Don't pull if building locally - I found that pull was failing because an image would get built but not pushed locally. So if building an image, I set pull to false - Join relative path and split dockerfile off to get context - With relative paths to dockerfiles the context wasn't getting created correctly. So instead join the context dir and the dockerfile path and split off the dockerfile to build the context I could use some advice on testing. It looked like there weren't many docker action tests. Signed-off-by: Aidan Jensen <aidan@artificial.com> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 21:53:40 +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#2021
No description provided.