diff --git a/gh-actions/fetch/action.yml b/gh-actions/fetch/action.yml index 706b22136..6361b5588 100644 --- a/gh-actions/fetch/action.yml +++ b/gh-actions/fetch/action.yml @@ -3,6 +3,8 @@ inputs: url: type: string required: true + path: + type: string outputs: path: @@ -12,9 +14,13 @@ runs: using: "composite" steps: - run: | - echo "FETCH ${{ inputs.url }}" - tmpdir=$(mktemp -d) - cd "$tmpdir" + if [[ -n "${{ inputs.path }}" ]]; then + path="${{ inputs.path }}" + else + path=$(mktemp -d) + fi + mkdir -p "$path" + cd "$path" curl -sLO "${{ inputs.url }}" filepath="$(realpath "$(basename "${{ inputs.url }}")")" echo "path=${filepath}" >> $GITHUB_OUTPUT