Skip to content

feat: add include-hidden-files input#137

Open
jonchurch wants to merge 1 commit intoactions:mainfrom
jonchurch:include-hidden-files
Open

feat: add include-hidden-files input#137
jonchurch wants to merge 1 commit intoactions:mainfrom
jonchurch:include-hidden-files

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

Copy link
Contributor

@tsusdere tsusdere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the Pages team we thank you for your contribution! ❤️

mauvehed added a commit to AustinHackers/austinhackers.github.io that referenced this pull request Mar 20, 2026
v4 excludes dotfile directories from the tar archive, which silently
broke .well-known/ paths. Pinned to v3 until upstream merges the
include-hidden-files option (actions/upload-pages-artifact#137).

Also removes the unnecessary .nojekyll file added in the previous
commit since this is a Hugo site, not Jekyll.
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.

5 participants