Skip to content

Commit d591b28

Browse files
committed
Resolve the workdir path before using it in tar
1 parent ca588d3 commit d591b28

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

action.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,21 @@ runs:
4545
with:
4646
name: ${{ inputs.workflow-artifact-name }}
4747
path: ${{ github.action_path }}/.tmp
48+
- name: >-
49+
Get a *NIX-style workspace directory absolute path
50+
# NOTE: This is necessary because attempting to use ${{ github.workspace }}
51+
# NOTE: in the `tar` command makes it error out under Windows workers. This
52+
# NOTE: is supposedly happening because `shell: bash` uses Git Bash (v4)
53+
# NOTE: and not MINGW Bash (v5) which does not have this problem.
54+
id: workdir
55+
run: echo "::set-output name=path::$(pwd)"
56+
working-directory: ${{ github.workspace }}
57+
shell: bash
4858
- name: Get the source out of the tarball
4959
run: >-
5060
tar xzvf ${{ inputs.source-tarball-name }}
51-
--directory='${{ github.workspace }}' --strip-components=1
61+
--directory='${{ steps.workdir.outputs.path }}'
62+
--strip-components=1
5263
working-directory: ${{ github.action_path }}/.tmp
5364
shell: bash
5465

0 commit comments

Comments
 (0)