Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignore all hidden files when creating zip #102

Merged
merged 10 commits into from
Sep 11, 2024
Merged

ignore all hidden files when creating zip #102

merged 10 commits into from
Sep 11, 2024

Conversation

tsusdere
Copy link
Contributor

@tsusdere tsusdere commented Sep 6, 2024

In the upload-artifact action it excludes hidden files that could lead to sensitive data. After talking with the actions team, even though we utilize this action at the very end we upload a .tar file

path: ${{ runner.temp }}/artifact.tar
. Hence, we need to exclude these files when we create the .tar.

@tsusdere tsusdere requested a review from a team as a code owner September 6, 2024 20:38
@@ -51,3 +51,7 @@ jobs:
- name: Check for absence of symlinks
run: if [ $(find artifact2 -type l | wc -l) != 0 ]; then echo "Symlinks found"; exit 1; fi
shell: bash

- name: Check for absence of hidden files
Copy link
Contributor

Choose a reason for hiding this comment

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

ln -s hello.txt bonjour.txt

addtional change required ^ to generate hidden file, otherwise it test nothing :)

@tsusdere tsusdere merged commit efaad07 into main Sep 11, 2024
3 checks passed
@tsusdere tsusdere deleted the hidden-files branch September 11, 2024 18:09
@douyixuan
Copy link

Sorry, but how should I upload the hidden files which is essential?

@tsusdere
Copy link
Contributor Author

@douyixuan For now if you opt to use this Action hidden files will be ignored. If you require these hidden files to be part of your project you may opt to not use this Action and instead utilize a different method to upload your files https://github.com/actions/upload-pages-artifact?tab=readme-ov-file#artifact-validation.

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