[PR #163] [MERGED] Improved gitignore handling #1375

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

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/163
Author: @aidansteele
Created: 3/18/2020
Status: Merged
Merged: 3/18/2020
Merged by: @cplee

Base: masterHead: master


📝 Commits (1)

  • 50471b5 Improved gitignore handling

📊 Changes

2 files changed (+16 additions, -7 deletions)

View changed files

📝 go.mod (+1 -1)
📝 pkg/container/docker_run.go (+15 -6)

📄 Description

I noticed that the tar file created and copied to the build container by act was taking a long time. I took a look and it was much bigger than I expected - it was including a whole lot of node_modules that should have been excluded.

It appeared that my gitignore config wasn't being respected - I have .gitignore files that aren't at the root of the repo. I switched to a different library, which happened to already be part of act. This reduced the size of the tar by a few hundred MB and sped up operations a fair bit.

I'd be happy to add a test for this, but that would be easier if I factored out the actual copy-to-container functionality into a different method. If you'd like that, let me know and I'll submit a second PR.

github.com/nektos/act@4a4bd36cf6/pkg/container/docker_run.go (L392-L395)


🔄 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/163 **Author:** [@aidansteele](https://github.com/aidansteele) **Created:** 3/18/2020 **Status:** ✅ Merged **Merged:** 3/18/2020 **Merged by:** [@cplee](https://github.com/cplee) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`50471b5`](https://github.com/nektos/act/commit/50471b5f9756b60b02c2bb41fac7298ea1de3562) Improved gitignore handling ### 📊 Changes **2 files changed** (+16 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `go.mod` (+1 -1) 📝 `pkg/container/docker_run.go` (+15 -6) </details> ### 📄 Description I noticed that the tar file created and copied to the build container by `act` was taking a long time. I took a look and it was much bigger than I expected - it was including a whole lot of node_modules that should have been excluded. It appeared that my gitignore config wasn't being respected - I have `.gitignore` files that aren't at the root of the repo. I switched to a different library, which happened to already be part of `act`. This reduced the size of the tar by a few hundred MB and sped up operations a fair bit. I'd be happy to add a test for this, but that would be easier if I factored out the actual copy-to-container functionality into a different method. If you'd like that, let me know and I'll submit a second PR. https://github.com/nektos/act/blob/4a4bd36cf65b36bb12ddad4d8379cd24b2384885/pkg/container/docker_run.go#L392-L395 --- <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:55 +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#1375
No description provided.