actions / actions/cache

Dereference symlinks when creating tar balls

Open
#1,435 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
5.6k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

Hello!

Say we have a folder a which contains symlinks to files in folder b, and we want to cache folder a, but not folder b, except that the symbolically linked files (and not the symlinks as such) should be cached as well.

Now, tar, which I see is used by the cache action, offers the flag --dereference/-h, which does exactly what we want. Could you please consider adding an option/input to the cache action that sets this flag when running tar to build the cache?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating where the cache action invokes tar to build archives and how action inputs are defined and passed through. Check how the requested dereference option should be exposed, then verify that caching a directory stores linked files rather than symlinks while excluding the otherwise uncached target directory.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ci-cd
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.