mirror of
https://github.com/actions/upload-pages-artifact.git
synced 2025-12-08 16:16:18 +00:00
Handle weird input paths by passing as env var
This commit is contained in:
21
action.yml
21
action.yml
@@ -19,11 +19,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 \
|
||||||
.
|
.
|
||||||
|
env:
|
||||||
|
INPUT_PATH: ${{ inputs.path }}
|
||||||
|
RUNNER_TEMP: ${{ runner.temp }}
|
||||||
|
|
||||||
# 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 +35,14 @@ 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 }}
|
||||||
|
RUNNER_TEMP: ${{ runner.temp }}
|
||||||
|
|
||||||
# Massage the paths for Windows only
|
# Massage the paths for Windows only
|
||||||
- name: Archive artifact
|
- name: Archive artifact
|
||||||
@@ -45,12 +51,15 @@ 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 }}
|
||||||
|
RUNNER_TEMP: ${{ runner.temp }}
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@main
|
uses: actions/upload-artifact@main
|
||||||
|
|||||||
Reference in New Issue
Block a user