mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #2003] act does not create separate containers for matrix builds with reusable workflows #963
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#963
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Andy4495 on GitHub (Sep 11, 2023).
Original GitHub issue: https://github.com/nektos/act/issues/2003
Bug report info
Command used with act
Describe issue
When using act with reusable workflows called with a matrix strategy, act does not create separate docker containers for each matrix combination; it tries to run them all in the same container which generates an error (see log output below).
If I run the same matrix strategy in a standalone workflow, act creates a separate docker container for each matrix combination and the workflow runs successfully.
Link to GitHub repository
https://github.com/Andy4495/act-workflow-test
Workflow content
Relevant log output
Additional information
As mentioned above, this works fine with standalone workflows.
@Andy4495 commented on GitHub (Sep 21, 2023):
I found the problem and it looks like the fix is pretty simple.
The container name generated for reusable workflows is not unique, so each matrix run was trying to use the same container. The code was using the non-unique caller job name instead of the unique name (with the -1, -2, ... appended).
So the fix should be in
runner/run_context.gofunctionString().Change this:
To this:
I'll open a pull request after I run a few more tests.