Skip to content

Commit

Permalink
Group tar's output to prevent it from messing up logs
Browse files Browse the repository at this point in the history
When it is used as a component of a composite action.
  • Loading branch information
SilverRainZ committed Feb 2, 2024
1 parent 0191170 commit 794e304
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ runs:
shell: sh
if: runner.os == 'Linux'
run: |
echo ::group::Archive artifact
tar \
--dereference --hard-dereference \
--directory "$INPUT_PATH" \
-cvf "$RUNNER_TEMP/artifact.tar" \
--exclude=.git \
--exclude=.github \
.
echo ::endgroup::
env:
INPUT_PATH: ${{ inputs.path }}

Expand All @@ -40,13 +42,15 @@ runs:
shell: sh
if: runner.os == 'macOS'
run: |
echo ::group::Archive artifact
gtar \
--dereference --hard-dereference \
--directory "$INPUT_PATH" \
-cvf "$RUNNER_TEMP/artifact.tar" \
--exclude=.git \
--exclude=.github \
.
echo ::endgroup::
env:
INPUT_PATH: ${{ inputs.path }}

Expand All @@ -55,6 +59,7 @@ runs:
shell: bash
if: runner.os == 'Windows'
run: |
echo ::group::Archive artifact
tar \
--dereference --hard-dereference \
--directory "$INPUT_PATH" \
Expand All @@ -63,6 +68,7 @@ runs:
--exclude=.github \
--force-local \
"."
echo ::endgroup::
env:
INPUT_PATH: ${{ inputs.path }}

Expand Down

0 comments on commit 794e304

Please sign in to comment.