Merge pull request #19 from kylewlacy/handle-weird-paths

Handle weird input paths
This commit is contained in:
James M. Greene
2022-09-02 17:16:39 -05:00
committed by GitHub

View File

@@ -19,11 +19,13 @@ runs:
run: | run: |
tar \ tar \
--dereference --hard-dereference \ --dereference --hard-dereference \
--directory ${{ inputs.path }} \ --directory "$INPUT_PATH" \
-cvf ${{ runner.temp }}/artifact.tar \ -cvf "$RUNNER_TEMP/artifact.tar" \
--exclude=.git \ --exclude=.git \
--exclude=.github \ --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) # 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 - name: Archive artifact
@@ -32,11 +34,13 @@ runs:
run: | run: |
gtar \ gtar \
--dereference --hard-dereference \ --dereference --hard-dereference \
--directory ${{ inputs.path }} \ --directory "$INPUT_PATH" \
-cvf ${{ runner.temp }}/artifact.tar \ -cvf "$RUNNER_TEMP/artifact.tar" \
--exclude=.git \ --exclude=.git \
--exclude=.github \ --exclude=.github \
. .
env:
INPUT_PATH: ${{ inputs.path }}
# Massage the paths for Windows only # Massage the paths for Windows only
- name: Archive artifact - name: Archive artifact
@@ -45,12 +49,14 @@ runs:
run: | run: |
tar \ tar \
--dereference --hard-dereference \ --dereference --hard-dereference \
--directory "${{ inputs.path }}" \ --directory "$INPUT_PATH" \
-cvf "${{ runner.temp }}\artifact.tar" \ -cvf "$RUNNER_TEMP\artifact.tar" \
--exclude=.git \ --exclude=.git \
--exclude=.github \ --exclude=.github \
--force-local \ --force-local \
"." "."
env:
INPUT_PATH: ${{ inputs.path }}
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@main uses: actions/upload-artifact@main