Skip to content

Commit 58c4499

Browse files
committed
Support add-to-path to add program to path
1 parent c536782 commit 58c4499

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ inputs:
99
description: Destination
1010
required: false
1111
default: ${{ github.workspace }}
12+
add-to-path:
13+
description: Add to path
14+
required: false
15+
default: ''
1216
version:
1317
description: Version to retrieve (defaults to latest)
1418
required: false
@@ -62,6 +66,7 @@ runs:
6266
GH_TOKEN: ${{ inputs.token }}
6367
repo: ${{ inputs.repository }}
6468
destination: ${{ inputs.destination }}
69+
add_to_path: ${{ inputs.add-to-path }}
6570
version: ${{ inputs.version }}
6671
os: ${{ inputs.os }}
6772
os_re: ${{ inputs.os-pattern }}

gh-program-downloader

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ maybe_extract_artifact() {
156156
esac
157157
if [ -n "$destination" ] && [ -f "$destination" ]; then
158158
chmod +x "$destination"
159+
if [ -n "$add_to_path" ]; then
160+
dirname "$destination" >> "$GITHUB_PATH"
161+
fi
159162
fi
160163
}
161164

0 commit comments

Comments
 (0)