diff --git a/action.yml b/action.yml index 13862be..2f162b8 100644 --- a/action.yml +++ b/action.yml @@ -19,11 +19,13 @@ runs: run: | tar \ --dereference --hard-dereference \ - --directory ${{ inputs.path }} \ - -cvf ${{ runner.temp }}/artifact.tar \ + --directory "$INPUT_PATH" \ + -cvf "$RUNNER_TEMP/artifact.tar" \ --exclude=.git \ --exclude=.github \ . + env: + INPUT_PATH: ${{ inputs.path }} # Switch to gtar (GNU tar instead of bsdtar which is the default in the MacOS runners so we can use --hard-dereference) - name: Archive artifact @@ -32,11 +34,13 @@ runs: run: | gtar \ --dereference --hard-dereference \ - --directory ${{ inputs.path }} \ - -cvf ${{ runner.temp }}/artifact.tar \ + --directory "$INPUT_PATH" \ + -cvf "$RUNNER_TEMP/artifact.tar" \ --exclude=.git \ --exclude=.github \ . + env: + INPUT_PATH: ${{ inputs.path }} # Massage the paths for Windows only - name: Archive artifact @@ -45,12 +49,14 @@ runs: run: | tar \ --dereference --hard-dereference \ - --directory "${{ inputs.path }}" \ - -cvf "${{ runner.temp }}\artifact.tar" \ + --directory "$INPUT_PATH" \ + -cvf "$RUNNER_TEMP\artifact.tar" \ --exclude=.git \ --exclude=.github \ --force-local \ "." + env: + INPUT_PATH: ${{ inputs.path }} - name: Upload artifact uses: actions/upload-artifact@main