From 502daa1fd228a20f117c31c63c8713c6aca4942c Mon Sep 17 00:00:00 2001 From: mesheets <16882600+mesheets@users.noreply.github.com> Date: Fri, 19 Jul 2024 19:28:29 -0400 Subject: [PATCH] Update tar command to exclude unwanted parent directories and "." --- .github/workflows/brickOS-bibo_CI.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/brickOS-bibo_CI.yml b/.github/workflows/brickOS-bibo_CI.yml index 0b3ef91..1891837 100644 --- a/.github/workflows/brickOS-bibo_CI.yml +++ b/.github/workflows/brickOS-bibo_CI.yml @@ -33,8 +33,9 @@ jobs: # Before archiving, tar the host installation output to preserve file permission # c.f. https://github.com/actions/upload-artifact?tab=readme-ov-file#permission-loss + # To avoid including a "." or other unwanted directory, c.f. https://stackoverflow.com/a/39530409 - name: Tar the host installation snapshot to preserve file permissions - run: tar --verbose --create --file build/install.tar --transform='s,build/destdir/,,' build/destdir/ + run: find build/destdir/ -printf "%P\n" | tar --verbose --create --file build/install.tar --no-recursion --directory=build/destdir/ --files-from=- - name: Archive the host installation snapshot tar file uses: actions/upload-artifact@v4