mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #2334] Symbolic links in GitHub action repositories are retained (or converted to 0 byte files is --use-new-action-cache) when used by workflows #1077
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#1077
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 @jsoref on GitHub (May 21, 2024).
Original GitHub issue: https://github.com/nektos/act/issues/2334
Bug report info
Command used with act
Describe issue
symbolic links in github action repositories are converted to 0 byte files when used by workflows.
Link to GitHub repository
https://github.com/check-spelling-sandbox/sturdy-tribble-2
Workflow content
Relevant log output
Additional information
https://github.com/check-spelling-sandbox/sturdy-tribble-2/actions/runs/9178827583/job/25246453375#step:2:83
The key line is:
Act output:
Fwiw,
--use-new-action-cachedoesn't appear to change thisApparently, the expected results are a file that contains the contents of the resolved link (not a symbolic link).
@ChristopherHX commented on GitHub (May 22, 2024):
For me is that flag needed to trigger this.
FYI You have
--use-new-action-cachein your$HOME/.actrcso removing it from the cli itself doesn't opt out@ChristopherHX commented on GitHub (May 22, 2024):
Act (master) in old action cache mode GitHub Codespace
@jsoref commented on GitHub (May 22, 2024):
Oh, oops. Well, GitHub changed (for security reasons) away from retaining symbolic links, so the old act behavior hasn't been a match to GitHub's behavior for a while either.
I could have had a script that depended on symlinks not being retained which would have broken with the standard act behavior. (Heck, I might...)
@ChristopherHX commented on GitHub (May 22, 2024):
Oh I forget that actions/runner uses
IOUtil.CopyDirectorythat lacks symlink support, since 2019.I'm not shure if they were ever preserved by the actions/runner, as the
IOUtil.CopyDirectoryalways converted them back to a fully copy after extracting.It's easier for me to preserve symlinks correctly than trying to replace them by file contents. I imageine needing to fetch additional data of the git object and modifying the filecollector to optionally follow symlinks.
@ChristopherHX commented on GitHub (May 22, 2024):
I assume this creates a copy instead of preserving the link
https://github.com/actions/runner/blame/ce4d7be00f4834b6889a82ea55020bb15fa834bf/src/Runner.Worker/ActionManager.cs#L890