actions / actions/cache

Consider making tar preserve permissions, uid, and guid

Open
#1,533 1 comment 3 reactions 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

Currently, tar is invoked as a regular user and without --preserve-permissions, and --same-owner. I wanted to cache some Docker volumes with action/cache and even after solving the permission issues with the Docker directories, I realized I needed --numeric-owner too as one of my Docker images were using uid:1000 without a corresponding user name on the host system. For these to work, tar also needs to be given s permission so it can set ownership information.

I created a custom action until (or if) this issue gets addressed but it is not ideal as it "wraps" the /usr/bin/tar binary to add these options.

I understand that these might be breaking changes so just adding an option for these would be great.

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

Begin by locating the tar invocation in the action/cache repository and reviewing how archive options are currently selected. Reproduce the Docker-volume case described here, then define and test behavior for permissions and numeric ownership, including the requested opt-in path and its interaction with existing cache compatibility.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, typescript
Domain
ci-cd, devops
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.