mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #1112] Issue: act not checking out in composite actions #632
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#632
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 @alex-harvey-z3q on GitHub (Apr 6, 2022).
Original GitHub issue: https://github.com/nektos/act/issues/1112
System information
act: customactversion: latestSetup
Contents of project dir
Workflow file
yamllint action inside umbrella-pr-tests
Note that I have edited this file in the cache for debugging purposes.
Expected behaviour
It should yamllint the file
foo.yaml.Actual behaviour
@ChristopherHX commented on GitHub (Apr 6, 2022):
Workaround, not tested
@alex-harvey-z3q commented on GitHub (Apr 7, 2022):
@ChristopherHX Confirming that your workaround has succeeded.
@github-actions[bot] commented on GitHub (May 8, 2022):
Issue is stale and will be closed in 14 days unless there is new activity
@jsoref commented on GitHub (May 31, 2022):
So, there's code which tries to decide if it should copy the workspace:
github.com/nektos/act@943a0e6eea/pkg/runner/run_context.go (L177-L192)Which calls:
github.com/nektos/act@943a0e6eea/pkg/runner/run_context.go (L643-L650)Which doesn't know that a composite step could have steps that could trigger
actions/checkout.In theory, it calls:
github.com/nektos/act@943a0e6eea/pkg/runner/run_context.go (L514-L537)But, in practice, since it hasn't peeked into the composite action (I don't think that at this point it has downloaded the composite action, and therefore, it can't know what's inside, and of course, a composite action could conditionally perform checkouts -- mine will do that!).
Anyway, moving on, we've now decided that
copyWorkspacewill befalsebecause nouses: actions/checkoutn.b. some repositories use
actions/checkout/, one usesactions/checkout/checkout.Anyway, eventually when the runtime gets around to the step, it uses this logic:
github.com/nektos/act@943a0e6eea/pkg/runner/step_action_remote.go (L47-L50)But, it really needs to have access to
copyWorkspacefrom earlier to decide not to use the logic it's using.