Skip to content

Conversation

@jonchurch
Copy link

@jonchurch jonchurch commented Jan 30, 2026

The Problem

Hidden files and directories (e.g. .well-known) are unconditionally excluded from the tar archive. There is no way to include them. (#129)

The Solution

Add an include-hidden-files input (default false) that skips the --exclude=.[^/]* pattern when set to true. .git and .github are always excluded regardless. Test coverage added for the new option.

I think this is the right approach rather than #134. Keep the default behavior safe, and give a sane option to users who know what they're doing. It was safe enough for upload-artifact, it should be safe enough here.

Context

actions/upload-artifact introduced hidden file exclusion and a corresponding include-hidden-files option in v4.4.0. This action adopted the same exclusion behavior in its tar step but never added the equivalent option. This PR closes that gap.

The only sane workaround without this option is to drop this action, manually create the tar, and hand it to upload-artifact directly. See expressjs/expressjs.com#2173 for an example.

@jonchurch jonchurch requested a review from a team as a code owner January 30, 2026 19:01
@jonchurch jonchurch force-pushed the include-hidden-files branch from ebb6151 to 214e498 Compare January 30, 2026 19:02
# The Problem

Hidden files and directories (e.g. `.well-known`) are unconditionally excluded from the tar archive. There is no way to include them. (actions#129)

# The Solution

Add an `include-hidden-files` input (default `false`) that skips the `--exclude=.[^/]*` pattern when set to `true`. `.git` and `.github` are always excluded regardless. Test coverage added for the new option.

I think this is the right approach rather than actions#134. Keep the default behavior safe, and give a sane option to users who know what they're doing. It was safe enough for upload-artifact, it should be safe enough here.

# Context

`actions/upload-artifact` introduced hidden file exclusion and a corresponding `include-hidden-files` option in [v4.4.0](https://github.com/actions/upload-artifact/releases/tag/v4.4.0). This action adopted the same exclusion behavior in its tar step but never added the equivalent option. This PR closes that gap.

The only sane workaround without this option is to drop this action, manually create the tar, and hand it to `upload-artifact` directly. See [expressjs/expressjs.com#2173](expressjs/expressjs.com#2173) for an example.
@breakertt
Copy link

I am also facing the same problem. I think this feature is very important! kudos!

@jmooring
Copy link

jmooring commented Feb 6, 2026

I think this is the right approach rather than #134. Keep the default behavior safe, and give a sane option to users who know what they're doing. It was safe enough for upload-artifact, it should be safe enough here.

Agreed. This seems like a no-brainer.

@jonchurch
Copy link
Author

@tsusdere any interest in reviewing this? You've got the git blame on the hidden file exclusion in #102 to bring parity between upload-artifact and upload-pages-artifact

This PR closes the loop for full parity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants