mirror of
https://github.com/actions/upload-pages-artifact.git
synced 2025-12-08 08:06:18 +00:00
Merge pull request #102 from actions/hidden-files
ignore all hidden files when creating zip
This commit is contained in:
8
.github/workflows/test-hosted-runners.yml
vendored
8
.github/workflows/test-hosted-runners.yml
vendored
@@ -44,8 +44,14 @@ jobs:
|
|||||||
run: tar -xf artifact2/artifact.tar -C artifact2 && rm artifact2/artifact.tar
|
run: tar -xf artifact2/artifact.tar -C artifact2 && rm artifact2/artifact.tar
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
- name: Check for absence of hidden files
|
||||||
|
run: if [ $(find artifact2 -regex ".*/\..*" | wc -l) != 0 ]; then echo "Hidden files found"; exit 1; fi
|
||||||
|
shell: bash
|
||||||
|
|
||||||
- name: Compare files
|
- name: Compare files
|
||||||
run: diff -qr artifact artifact2
|
run: |
|
||||||
|
rm artifact/.hidden
|
||||||
|
diff -qr artifact artifact2
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Check for absence of symlinks
|
- name: Check for absence of symlinks
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ runs:
|
|||||||
-cvf "$RUNNER_TEMP/artifact.tar" \
|
-cvf "$RUNNER_TEMP/artifact.tar" \
|
||||||
--exclude=.git \
|
--exclude=.git \
|
||||||
--exclude=.github \
|
--exclude=.github \
|
||||||
|
--exclude=".[^/]*" \
|
||||||
.
|
.
|
||||||
echo ::endgroup::
|
echo ::endgroup::
|
||||||
env:
|
env:
|
||||||
@@ -49,6 +50,7 @@ runs:
|
|||||||
-cvf "$RUNNER_TEMP/artifact.tar" \
|
-cvf "$RUNNER_TEMP/artifact.tar" \
|
||||||
--exclude=.git \
|
--exclude=.git \
|
||||||
--exclude=.github \
|
--exclude=.github \
|
||||||
|
--exclude=".[^/]*" \
|
||||||
.
|
.
|
||||||
echo ::endgroup::
|
echo ::endgroup::
|
||||||
env:
|
env:
|
||||||
@@ -66,6 +68,7 @@ runs:
|
|||||||
-cvf "$RUNNER_TEMP\artifact.tar" \
|
-cvf "$RUNNER_TEMP\artifact.tar" \
|
||||||
--exclude=.git \
|
--exclude=.git \
|
||||||
--exclude=.github \
|
--exclude=.github \
|
||||||
|
--exclude=".[^/]*" \
|
||||||
--force-local \
|
--force-local \
|
||||||
"."
|
"."
|
||||||
echo ::endgroup::
|
echo ::endgroup::
|
||||||
|
|||||||
@@ -8,3 +8,6 @@ echo 'world' > subdir/world.txt
|
|||||||
# Add some symlinks (which we should dereference properly when archiving)
|
# Add some symlinks (which we should dereference properly when archiving)
|
||||||
ln -s subdir subdir-link
|
ln -s subdir subdir-link
|
||||||
ln -s hello.txt bonjour.txt
|
ln -s hello.txt bonjour.txt
|
||||||
|
|
||||||
|
# Create some hidden files
|
||||||
|
echo 'foo' > .hidden
|
||||||
|
|||||||
Reference in New Issue
Block a user